ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kim Ebert <kim.eb...@imatsolutions.com>
Subject Re: cTAKES 3.2.0 CPE error
Date Tue, 25 Nov 2014 18:27:43 GMT
Hi Susrutha,

Sorry for the difficulty on getting things to run here.

I have a custom system that packages things for me a bit differently. It
appears the default bin release doesn't include all the resources in the
the directory. You could download the src folder, and then copy each of
the resource directories from the subdirectory of the project into your
resource directory.

This should get you around any of the errors you were receiving
originally, and allow you to have all the resources be accessible.

apache-ctakes-3.2.0-src/ctakes-relation-extractor-res/src/main/resources/* 
-> your resources directory
apache-ctakes-3.2.0-src/ctakes-smoking-status/src/main/resources/* ->
your resources directory
apache-ctakes-3.2.0-src/*/resources/* -> your resources directory

Let me know if that works for you.


IMAT Solutions <http://imatsolutions.com>
Kim Ebert
Software Engineer
Office: 801.669.7342
kim.ebert@imatsolutions.com <mailto:greg.hubert@imatsolutions.com>
On 11/25/2014 04:43 AM, Susrutha Gongalla wrote:
> Hello Kim,
>
> Thank you for your response.
>
> I have removed the resource jar files suggested by you and tried it out.
> I am now facing the following error.
>
> java.io.FileNotFoundException: org\apache\ctakes\dependency\parser\mo
> dels\lemmatizer\dictionary-1.3.1.jar (The system cannot find the path
> specified)
>
> Could you please suggest if there is anything else I can try?
>
> Given below is the complete log of command prompt:
>
> C:\cTAKES_HOME\apache-ctakes-3.2.0>java -cp
> "C:\cTAKES_HOME\apache-ctakes-3.2.0/
> lib/*;C:\cTAKES_HOME\apache-ctakes-3.2.0/desc/;C:\cTAKES_HOME\apache-ctakes-3.2.
> 0/resources/"
> -Dlog4j.configuration=file:/C:\cTAKES_HOME\apache-ctakes-3.2.0/con
> fig/log4j.xml -Xms512M -Xmx3g org.apache.uima.tools.cpm.CpmFrame
> Nov 25, 2014 4:04:03 PM java.util.prefs.WindowsPreferences <init>
> WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
> at root 0
> x80000002. Windows RegCreateKeyEx(...) returned error code 5.
> log4j: reset attribute= "false".
> log4j: Threshold ="null".
> log4j: Level value for root is  [INFO].
> log4j: root level set to INFO
> log4j: Class name: [org.apache.log4j.ConsoleAppender]
> log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> log4j: Setting property [conversionPattern] to [%d{dd MMM yyyy
> HH:mm:ss} %5p %c{
> 1} - %m%n].
> log4j: Adding appender named [consoleAppender] to category [root].
> 25 Nov 2014 16:05:42  INFO ClearNLPDependencyParserAE - using Morphy
> analysis? t
> rue
> org.apache.uima.resource.ResourceInitializationException:
> Initialization of CAS
> Processor with name "AggregateCdaProcessor" failed.
>         at
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initi
> alize(CollectionProcessingEngine_impl.java:83)
>         at
> org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingE
> ngine(UIMAFramework_impl.java:420)
>         at
> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(UIMAF
> ramework.java:864)
>         at
> org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java:573)
>
>         at
> org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:105)
>         at org.apache.uima.tools.cpm.CpmPanel$1.run(CpmPanel.java:713)
> Caused by: org.apache.uima.resource.ResourceConfigurationException:
> Initializati
> on of CAS Processor with name "AggregateCdaProcessor" failed.
>         at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceInteg
> ratedCasProcessor(CPEFactory.java:1104)
>         at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProces
> sors(CPEFactory.java:550)
>         at
> org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(BaseCPMImpl.java
> :253)
>         at
> org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(BaseCPMImpl.ja
> va:127)
>         at
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initi
> alize(CollectionProcessingEngine_impl.java:75)
>         ... 5 more
> Caused by: org.apache.uima.resource.ResourceInitializationException:
> Initializat
> ion of annotator class
> "org.apache.ctakes.dependency.parser.ae.ClearNLPDependenc
> yParserAE" failed.  (Descriptor:
> file:/C:/cTAKES_HOME/apache-ctakes-3.2.0/desc/c
> takes-dependency-parser/desc/analysis_engine/ClearNLPDependencyParserAE.xml)
>         at
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.ini
> tializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:252)
>         at
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.ini
> tialize(PrimitiveAnalysisEngine_impl.java:156)
>         at
> org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analy
> sisEngineFactory_impl.java:94)
>         at
> org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(Co
> mpositeResourceFactory_impl.java:62)
>         at
> org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:269)
>
>         at
> org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.jav
> a: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.ini
> tASB(AggregateAnalysisEngine_impl.java:431)
>         at
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.ini
> tializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
>         at
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.ini
> tialize(AggregateAnalysisEngine_impl.java:185)
>         at
> org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analy
> sisEngineFactory_impl.java:94)
>         at
> org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(Co
> mpositeResourceFactory_impl.java:62)
>         at
> org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:269)
>
>         at
> org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:314)
>
>         at
> org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.jav
> a:425)
>         at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceInteg
> ratedCasProcessor(CPEFactory.java:1088)
>         ... 9 more
> Caused by: org.apache.uima.resource.ResourceInitializationException
>         at
> org.apache.ctakes.dependency.parser.ae.ClearNLPDependencyParserAE.ini
> tialize(ClearNLPDependencyParserAE.java:138)
>         at
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.ini
> tializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:250)
>         ... 24 more
> Caused by: java.io.FileNotFoundException:
> org\apache\ctakes\dependency\parser\mo
> dels\lemmatizer\dictionary-1.3.1.jar (The system cannot find the path
> specified)
>
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(Unknown Source)
>         at
> org.apache.ctakes.core.resource.FileLocator.getAsStream(FileLocator.j
> ava:50)
>         at
> org.apache.ctakes.dependency.parser.ae.ClearNLPDependencyParserAE.ini
> tialize(ClearNLPDependencyParserAE.java:125)
>         ... 25 more
>
> Thank you in advance.
>
> Regards,
> Susrutha
>
> On Wed, Nov 19, 2014 at 9:04 PM, Kim Ebert
> <kim.ebert@perfectsearchcorp.com
> <mailto:kim.ebert@perfectsearchcorp.com>> wrote:
>
>     Susrutha,
>
>     Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
>
>     I believe this is caused in some versions by having the resources
>     in jar files. I found it effective to remove the resource jar
>     files and rely upon the resources directory. So ctakes*-res-*.jar
>
>     Let me know if that helps.
>
>     Thanks,
>
>     IMAT Solutions <http://imatsolutions.com>
>     Kim Ebert
>     Software Engineer
>     Office: 801.669.7342
>     kim.ebert@imatsolutions.com <mailto:greg.hubert@imatsolutions.com>
>     On 11/19/2014 03:44 AM, Susrutha Gongalla wrote:
>>     Hi,
>>
>>     I have installed cTAKES 3.2.0 along with corresponding resources
>>     as per the instructions given on Apache website.
>>
>>     I get the following error when I run the runctakescpe.bat file
>>
>>     C:\cTAKES_HOME\apache-ctakes-3.2.0>java -cp
>>     "C:\cTAKES_HOME\apache-ctakes-3.2.0/
>>     lib/*;C:\cTAKES_HOME\apache-ctakes-3.2.0/desc/;C:\cTAKES_HOME\apache-ctakes-3.2.
>>     0/resources/"
>>     -Dlog4j.configuration=file:/C:\cTAKES_HOME\apache-ctakes-3.2.0/con
>>     fig/log4j.xml -Xms512M -Xmx3g org.apache.uima.tools.cpm.CpmFrame
>>     Nov 19, 2014 1:38:47 PM java.util.prefs.WindowsPreferences <init>
>>     WARNING: Could not open/create prefs root node
>>     Software\JavaSoft\Prefs at root 0
>>     x80000002. Windows RegCreateKeyEx(...) returned error code 5.
>>
>>     If I ignore this error and try to run the pipeline using
>>     test1.xml CPE descriptor (example given in the installation guide),
>>     I get an error caused due to java.lang.IllegalArgumentException
>>
>>     Given below is the cmd output:
>>
>>     log4j: reset attribute= "false".
>>     log4j: Threshold ="null".
>>     log4j: Level value for root is  [INFO].
>>     log4j: root level set to INFO
>>     log4j: Class name: [org.apache.log4j.ConsoleAppender]
>>     log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
>>     log4j: Setting property [conversionPattern] to [%d{dd MMM yyyy
>>     HH:mm:ss} %5p %c{
>>     1} - %m%n].
>>     log4j: Adding appender named [consoleAppender] to category [root].
>>     19 Nov 2014 13:39:35  INFO ClearNLPDependencyParserAE - using
>>     Morphy analysis? t
>>     rue
>>     Loading configuration.
>>     Loading feature templates.
>>     Loading lexica.
>>     Loading model:
>>     ................................................................................
>>     ........
>>     19 Nov 2014 13:39:52  INFO TokenizerAnnotatorPTB - Initializing
>>     org.apache.ctake
>>     s.core.ae.TokenizerAnnotatorPTB
>>     19 Nov 2014 13:39:52  INFO ContextDependentTokenizerAnnotator -
>>     Finite state mac
>>     hines loaded.
>>     19 Nov 2014 13:39:52  INFO ContextAnnotator - SCOPE ORDER: [1, 3]
>>     19 Nov 2014 13:39:52  INFO NegationContextAnalyzer -
>>     initBoundaryData() called f
>>     or ContextInitializer
>>     19 Nov 2014 13:39:52  INFO ContextAnnotator - SCOPE ORDER: [1, 3]
>>     19 Nov 2014 13:39:52  INFO StatusContextAnalyzer -
>>     initBoundaryData() called for
>>      ContextInitializer
>>     19 Nov 2014 13:39:52  INFO SentenceDetector - Sentence detector
>>     model file: org/
>>     apache/ctakes/core/sentdetect/sd-med-model.zip
>>     19 Nov 2014 13:39:52  INFO POSTagger - POS tagger model file:
>>     org/apache/ctakes/
>>     postagger/models/mayo-pos.zip
>>     19 Nov 2014 13:39:52  INFO Chunker - Chunker model file:
>>     org/apache/ctakes/chunk
>>     er/models/chunker-model.zip
>>     org.apache.uima.resource.ResourceInitializationException:
>>     Initialization of CAS
>>     Processor with name "AggregateCdaProcessor" failed.
>>             at
>>     org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initi
>>     alize(CollectionProcessingEngine_impl.java:83)
>>             at
>>     org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingE
>>     ngine(UIMAFramework_impl.java:420)
>>             at
>>     org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(UIMAF
>>     ramework.java:864)
>>             at
>>     org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java:573)
>>
>>             at
>>     org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:105)
>>             at
>>     org.apache.uima.tools.cpm.CpmPanel$1.run(CpmPanel.java:713)
>>     Caused by:
>>     org.apache.uima.resource.ResourceConfigurationException: Initializati
>>     on of CAS Processor with name "AggregateCdaProcessor" failed.
>>             at
>>     org.apache.uima.collection.impl.cpm.container.CPEFactory.produceInteg
>>     ratedCasProcessor(CPEFactory.java:1104)
>>             at
>>     org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProces
>>     sors(CPEFactory.java:550)
>>             at
>>     org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(BaseCPMImpl.java
>>     :253)
>>             at
>>     org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(BaseCPMImpl.ja
>>     va:127)
>>             at
>>     org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initi
>>     alize(CollectionProcessingEngine_impl.java:75)
>>             ... 5 more
>>     Caused by: java.lang.IllegalArgumentException: URI is not
>>     hierarchical
>>             at java.io.File.<init>(Unknown Source)
>>             at
>>     org.apache.ctakes.core.resource.FileResourceImpl.load(FileResourceImp
>>     l.java:44)
>>             at
>>     org.apache.uima.resource.impl.ResourceManager_impl.registerResource(R
>>     esourceManager_impl.java:603)
>>             at
>>     org.apache.uima.resource.impl.ResourceManager_impl.initializeExternal
>>     Resources(ResourceManager_impl.java:442)
>>             at
>>     org.apache.uima.resource.Resource_ImplBase.initialize(Resource_ImplBa
>>     se.java:153)
>>             at
>>     org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.initializ
>>     e(AnalysisEngineImplBase.java:157)
>>             at
>>     org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.ini
>>     tialize(PrimitiveAnalysisEngine_impl.java:123)
>>             at
>>     org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analy
>>     sisEngineFactory_impl.java:94)
>>             at
>>     org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(Co
>>     mpositeResourceFactory_impl.java:62)
>>             at
>>     org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:269)
>>
>>             at
>>     org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.jav
>>     a: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.ini
>>     tASB(AggregateAnalysisEngine_impl.java:431)
>>             at
>>     org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.ini
>>     tializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
>>             at
>>     org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.ini
>>     tialize(AggregateAnalysisEngine_impl.java:185)
>>             at
>>     org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analy
>>     sisEngineFactory_impl.java:94)
>>             at
>>     org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(Co
>>     mpositeResourceFactory_impl.java:62)
>>             at
>>     org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:269)
>>
>>             at
>>     org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:314)
>>
>>             at
>>     org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.jav
>>     a:425)
>>             at
>>     org.apache.uima.collection.impl.cpm.container.CPEFactory.produceInteg
>>     ratedCasProcessor(CPEFactory.java:1088)
>>             ... 9 more
>>
>>
>>     I have followed everything as per the user installation guide.
>>     Can somebody please throw some light on what might be causing
>>     this error?
>>     I would greatly appreciate any help in this regard!
>>
>>     Thanks and Regards,
>>     Susrutha Gongalla
>
>


Mime
View raw message