ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dligach, Dmitriy" <ddlig...@luc.edu>
Subject running pipeline from command line
Date Tue, 28 Jun 2016 18:22:38 GMT
Dear cTAKES developers,

I ran into new issues running a uimafit pipeline from command line. I am trying to get a basic
pipeline to run using this command: 

mvn exec:java -Dexec.mainClass=“org.apache.ctakes.examples.pipelines.BasicAnnotations"

It runs fine in Eclipse, but it stumbles on dictionary lookup when I run from command line.
The dictionary lookup is added as follows:

aggregateBuilder.add( DefaultJCasTermAnnotator.createAnnotatorDescription() ) 

The full error message is below, but basically it is unable to find org/apache/ctakes/dictionary/lookup/fast/cTakesHsql.xml.

Which does exist on my system in two places:

./ctakes-dictionary-lookup-fast-res/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/cTakesHsql.xml
./ctakes-dictionary-lookup-fast-res/target/classes/org/apache/ctakes/dictionary/lookup/fast/cTakesHsql.xml

I noticed that when I execute the mvn exec:java command, maven downloads the jars into my
maven repository. Not sure why it’s doing that — shouldn’t it be able to run everything
from the project directories?

Any thoughts will be greatly appreciated.

Dima

28 Jun 2016 12:28:29  INFO AbstractJCasTermAnnotator - Using Dictionary Descriptor: org/apache/ctakes/dictionary/lookup/fast/cTakesHsql.xml
[WARNING] 
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:294)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.uima.resource.ResourceInitializationException: Initialization of annotator
class "org.apache.ctakes.dictionary.lookup2.ae.DefaultJCasTermAnnotator" failed.  (Descriptor:
<unknown>)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:252)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:156)
	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:269)
	at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:387)
	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:254)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:431)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:185)
	at org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine(AnalysisEngineFactory.java:711)
	at org.apache.uima.fit.factory.AggregateBuilder.createAggregate(AggregateBuilder.java:207)
	at org.apache.ctakes.examples.pipelines.BasicAnnotations.main(BasicAnnotations.java:69)
	... 6 more
Caused by: org.apache.uima.resource.ResourceInitializationException
	at org.apache.ctakes.dictionary.lookup2.ae.AbstractJCasTermAnnotator.initialize(AbstractJCasTermAnnotator.java:117)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:250)
	... 18 more
Caused by: java.io.FileNotFoundException: org/apache/ctakes/dictionary/lookup/fast/cTakesHsql.xml
(No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at org.apache.ctakes.core.resource.FileLocator.getAsStream(FileLocator.java:61)
	at org.apache.ctakes.dictionary.lookup2.ae.AbstractJCasTermAnnotator.initialize(AbstractJCasTermAnnotator.java:114)
	... 19 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:17 min
[INFO] Finished at: 2016-06-28T12:28:29-05:00
[INFO] Final Memory: 104M/188M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli)
on project ctakes-examples: An exception occured while executing the Java class. null: InvocationTargetException:
Initialization of annotator class "org.apache.ctakes.dictionary.lookup2.ae.DefaultJCasTermAnnotator"
failed.  (Descriptor: <unknown>): ResourceInitializationException: org/apache/ctakes/dictionary/lookup/fast/cTakesHsql.xml
(No such file or directory) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Dima

Mime
View raw message