Re: UIMA version 3 or later JCas required [EXTERNAL]
Ok, downgrading UIMA fixed this... its just a weird error message since it says UIMA v. 3 or higher is required... But this seems to work fine with UIMA v. 2x :) On Tue, Aug 17, 2021 at 10:08 PM Finan, Sean < sean.fi...@childrens.harvard.edu> wrote: > > Without a little more information I cannot tell you exactly why you are > getting that exact error. > > ctakes 4.0.0.1 was built with UIMA v2. Trying to use a newer version of > uima and/or uimafit will (frequently) not work. > > Any declared dependency on ctakes, such as you have for core and > clinical-pipeline (which includes core) will import the required uima, > uimafit and other dependencies. No additional declaration of dependency is > required. > > If you absolutely require uima 3 for some reason then I don't think that I > can help you. You may want to ask the uima lists about mixing versions or > equivalent v2 solutions for your goals. > > Sean > > > > From: Benjamin hansen > Sent: Tuesday, August 17, 2021 3:35 PM > To: dev@ctakes.apache.org > Subject: UIMA version 3 or later JCas required [EXTERNAL] > > * External Email - Caution * > > > Hello, I am trying to compile some of the examples from the ctakes example > directory using maven. Specifically I am trying to compile the example > called: HelloWorldAggregatePipeline > > I am using ctakes v. 4.0.0.1 and uima fit v. 3.0.2 and i am getting the > following error when i run > > mvn package > > and then > > mvn exec:java -Dexec.mainClass=com.myproj.app.HelloWorldAggregatePipeline > > > > Caused by: org.apache.uima.cas.CASRuntimeException: The JCas cannot be > initialized. The following errors occurred: > > JCas Class "org.apache.uima.jcas.tcas.DocumentAnnotation", loaded from > > "jar:file:/Users/myuser/.m2/repository/org/apache/uima/uimaj-document-annotation/2.9.0/uimaj-document-annotation-2.9.0.jar!/org/apache/uima/jcas/tcas/DocumentAnnotation.class", > is missing required constructor; likely cause is wrong version (UIMA > version 3 or later JCas required). > > > I don't understand why i am getting this error when i am using uima fit v. > 3.0.2. > > My pom.xml file is seen below > > > Can anyone help me fix this please? > > > > > > > > https://urldefense.com/v3/__http://maven.apache.org/POM/4.0.0__;!!NZvER7FxgEiBAiR_!_gz7tElyeaTShAFytscJFcJGhRYag_Hgp1bdGfI1KSmdRS05tiRrLBFBwlbg_S6zR_NKwy3Wlow$ > " xmlns:xsi=" > > https://urldefense.com/v3/__http://www.w3.org/2001/XMLSchema-instance__;!!NZvER7FxgEiBAiR_!_gz7tElyeaTShAFytscJFcJGhRYag_Hgp1bdGfI1KSmdRS05tiRrLBFBwlbg_S6zR_NKjIAjSAA$ > " xsi:schemaLocation=" > > https://urldefense.com/v3/__http://maven.apache.org/POM/4.0.0__;!!NZvER7FxgEiBAiR_!_gz7tElyeaTShAFytscJFcJGhRYag_Hgp1bdGfI1KSmdRS05tiRrLBFBwlbg_S6zR_NKwy3Wlow$ > > https://urldefense.com/v3/__http://maven.apache.org/xsd/maven-4.0.0.xsd__;!!NZvER7FxgEiBAiR_!_gz7tElyeaTShAFytscJFcJGhRYag_Hgp1bdGfI1KSmdRS05tiRrLBFBwlbg_S6zR_NKdagS9L8$ > "> > 4.0.0 > > com.myproj.app > myproj > 1.0-SNAPSHOT > > myproj > > > https://urldefense.com/v3/__http://www.example.com__;!!NZvER7FxgEiBAiR_!_gz7tElyeaTShAFytscJFcJGhRYag_Hgp1bdGfI1KSmdRS05tiRrLBFBwlbg_S6zR_NKGoYVPsc$ > > > > UTF-8 > 1.7 > 1.7 > > > > > junit > junit > 4.11 > test > > > > org.apache.uima > uimaj-core > 3.2.0 > > > > org.apache.uima > uimafit-core > 3.2.0 > > > > org.apache.ctakes > ctakes-core > 4.0.0.1 > > > > org.apache.ctakes > ctakes-clinical-pipeline > 4.0.0.1 > > > > > > > > > > > maven-clean-plugin > 3.1.0 > > > > maven-resources-plugin > 3.0.2 > > > maven-compiler-plugin > 3.8.0 > > > maven-surefire-plugin > 2.22.1 > > > maven-jar-plugin > 3.0.2 > > > maven-install-plugin > 2.5.2 > > > maven-deploy-plugin > 2.8.2 > > > > maven-site-plugin > 3.7.1 > > > maven-project-info-reports-plugin > 3.0.0 > > > > > >
Re: An exception occured while executing the Java class. URI is not hierarchical [EXTERNAL]
Thanks for the input. So I am trying to use the ClinicalPipelineFactory.getTokenProcessingPipeline which includes the LVG which seems to be having the issue. But you say i can just replace the LVG part with the DependencyParser in that pipeline? Can you elaborate a bit on where I can find the DependencyParser? On Wed, Aug 18, 2021 at 5:56 PM Peter Abramowitsch wrote: > Hi Benjamin, > > If what you're looking for are the lemmas of tokens, just use the > DependencyParser instead of LVG > I had another problem with LVG as well, but I think that it might be simply > that all the needed resources are not being copied into the right place. > This was done without the lvg > > { > "_type": "ConllDependencyNode", > "sofa": 1, > "begin": 3, > "end": 10, > "id": 2, > "form": "decided", > "lemma": "decide", > "cpostag": "VBD", > "postag": "VBD", > "feats": "_", > "head": 137, > "deprel": "root", > "pdeprel": "_" > } > > On Wed, Aug 18, 2021 at 7:29 AM Finan, Sean < > sean.fi...@childrens.harvard.edu> wrote: > > > Hi Benjamin, > > > > My first question is: what pipeline are you trying to run? > > > > My second question is: Do you really need to use LVG? > > > > Sean > > > > From: Benjamin hansen > > Sent: Wednesday, August 18, 2021 3:07 AM > > To: dev@ctakes.apache.org > > Subject: An exception occured while executing the Java class. URI is not > > hierarchical [EXTERNAL] > > > > * External Email - Caution * > > > > > > While working at a simple pipeline example I got this error: > > > > *java.lang.IllegalArgumentException*: *URI is not hierarchical* > > > > *at* java.io.File. (*File.java:420*) > > > > *at* org.apache.ctakes.lvg.resource.LvgCmdApiResourceImpl.load ( > > *LvgCmdApiResourceImpl.java:65*) > > > > > > I found that this issue has already been reported 4 years ago here > > > > > https://urldefense.com/v3/__https://issues.apache.org/jira/browse/CTAKES-445__;!!NZvER7FxgEiBAiR_!9HBmXkq30TUdwnSpuHc8_7iEVkoMAiJ3p_rSTXE5d90TARHEdioOMNukOUaL6eB5CboTRBMsOYI$ > > > > > > I am on MacOS which the workaround patched proposed in that thread does > not > > fix... And like the last comment in the thread says - the patch likely > also > > does not work on linux. > > > > > > This seems to be quite a serious bug since both mac and linux would be > > serious development and production platforms for ctakes users. > > > > > > Is there no fix for this after 4 years? > > >
Re: An exception occured while executing the Java class. URI is not hierarchical [EXTERNAL]
Btw. the full stacktrace is as follows: 19 Aug 2021 13:11:20 INFO LvgAnnotator - URL for lvg.properties =file:/Users/myuser/.m2/repository/net/sourceforge/ctakesresources/ctakes-resources-lvg2008/4.0.0/ctakes-resources-lvg2008-4.0.0.jar!/org/apache/ctakes/lvg/data/config/lvg.properties 19 Aug 2021 13:11:20 INFO SentenceDetector - Sentence detector model file: org/apache/ctakes/core/sentdetect/sd-med-model.zip 19 Aug 2021 13:11:20 INFO TokenizerAnnotatorPTB - Initializing org.apache.ctakes.core.ae.TokenizerAnnotatorPTB [WARNING] java.lang.IllegalArgumentException: URI is not hierarchical at java.io.File. (File.java:420) at org.apache.ctakes.lvg.resource.LvgCmdApiResourceImpl.load (LvgCmdApiResourceImpl.java:65) at org.apache.uima.resource.impl.ResourceManager_impl.registerResource (ResourceManager_impl.java:753) at org.apache.uima.resource.impl.ResourceManager_impl.initializeExternalResources (ResourceManager_impl.java:597) at org.apache.uima.resource.Resource_ImplBase.initialize (Resource_ImplBase.java:210) at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.initialize (AnalysisEngineImplBase.java:157) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize (PrimitiveAnalysisEngine_impl.java:136) at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource (AnalysisEngineFactory_impl.java:94) at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource (CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource (UIMAFramework.java:279) at org.apache.uima.UIMAFramework.produceAnalysisEngine (UIMAFramework.java:407) at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup (ASB_impl.java:256) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB (AggregateAnalysisEngine_impl.java:435) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine (AggregateAnalysisEngine_impl.java:379) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize (AggregateAnalysisEngine_impl.java:192) at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource (AnalysisEngineFactory_impl.java:94) at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource (CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource (UIMAFramework.java:279) at org.apache.uima.UIMAFramework.produceAnalysisEngine (UIMAFramework.java:407) at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup (ASB_impl.java:256) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB (AggregateAnalysisEngine_impl.java:435) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine (AggregateAnalysisEngine_impl.java:379) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize (AggregateAnalysisEngine_impl.java:192) at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource (AnalysisEngineFactory_impl.java:94) at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource (CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource (UIMAFramework.java:279) at org.apache.uima.UIMAFramework.produceAnalysisEngine (UIMAFramework.java:407) at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup (ASB_impl.java:256) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB (AggregateAnalysisEngine_impl.java:435) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine (AggregateAnalysisEngine_impl.java:379) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize (AggregateAnalysisEngine_impl.java:192) at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource (AnalysisEngineFactory_impl.java:94) at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource (CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource (UIMAFramework.java:279) at org.apache.uima.UIMAFramework.produceResource (UIMAFramework.java:331) at org.apache.uima.UIMAFramework.produceAnalysisEngine (UIMAFramework.java:448) at org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine (AnalysisEngineFactory.java:206) at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline (SimplePipeline.java:296) at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline (SimplePipeline.java:329) at com.careindexing.app.HelloWorldAggregatePipeline.main (HelloWorldAggregatePipeline.java:64) at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254) at java.lang.Thread.run (Thread.java:748) [INFO] [INFO] BUILD FAILURE [INFO] --
Re: An exception occured while executing the Java class. URI is not hierarchical [EXTERNAL]
RE the Dependency Parser, it is part of the release. Just use the PiperCreator app and look for it in the list of modules. It will tell you it's prerequisites, and therefore where in your Piper file it belongs. addDescription ClearNLPDependencyParserAE - Peter On Thu, Aug 19, 2021 at 2:39 AM Benjamin hansen wrote: > Thanks for the input. > So I am trying to use > the ClinicalPipelineFactory.getTokenProcessingPipeline which includes the > LVG which seems to be having the issue. But you say i can just replace the > LVG part with the DependencyParser in that pipeline? Can you elaborate a > bit on where I can find the DependencyParser? > > > On Wed, Aug 18, 2021 at 5:56 PM Peter Abramowitsch < > pabramowit...@gmail.com> > wrote: > > > Hi Benjamin, > > > > If what you're looking for are the lemmas of tokens, just use the > > DependencyParser instead of LVG > > I had another problem with LVG as well, but I think that it might be > simply > > that all the needed resources are not being copied into the right place. > > This was done without the lvg > > > > { > > "_type": "ConllDependencyNode", > > "sofa": 1, > > "begin": 3, > > "end": 10, > > "id": 2, > > "form": "decided", > > "lemma": "decide", > > "cpostag": "VBD", > > "postag": "VBD", > > "feats": "_", > > "head": 137, > > "deprel": "root", > > "pdeprel": "_" > > } > > > > On Wed, Aug 18, 2021 at 7:29 AM Finan, Sean < > > sean.fi...@childrens.harvard.edu> wrote: > > > > > Hi Benjamin, > > > > > > My first question is: what pipeline are you trying to run? > > > > > > My second question is: Do you really need to use LVG? > > > > > > Sean > > > > > > From: Benjamin hansen > > > Sent: Wednesday, August 18, 2021 3:07 AM > > > To: dev@ctakes.apache.org > > > Subject: An exception occured while executing the Java class. URI is > not > > > hierarchical [EXTERNAL] > > > > > > * External Email - Caution * > > > > > > > > > While working at a simple pipeline example I got this error: > > > > > > *java.lang.IllegalArgumentException*: *URI is not hierarchical* > > > > > > *at* java.io.File. (*File.java:420*) > > > > > > *at* org.apache.ctakes.lvg.resource.LvgCmdApiResourceImpl.load ( > > > *LvgCmdApiResourceImpl.java:65*) > > > > > > > > > I found that this issue has already been reported 4 years ago here > > > > > > > > > https://urldefense.com/v3/__https://issues.apache.org/jira/browse/CTAKES-445__;!!NZvER7FxgEiBAiR_!9HBmXkq30TUdwnSpuHc8_7iEVkoMAiJ3p_rSTXE5d90TARHEdioOMNukOUaL6eB5CboTRBMsOYI$ > > > > > > > > > I am on MacOS which the workaround patched proposed in that thread does > > not > > > fix... And like the last comment in the thread says - the patch likely > > also > > > does not work on linux. > > > > > > > > > This seems to be quite a serious bug since both mac and linux would be > > > serious development and production platforms for ctakes users. > > > > > > > > > Is there no fix for this after 4 years? > > > > > >