Hi,
I opened the below Jira to track this:
https://issues.apache.org/jira/browse/CTAKES-347

Essentially, I believe the URI is not hierarchal error is due to the config 
using physical file:///<file:///\\> instead of classpath [1].
I did not get a chance test or verify this.  As a temp work around, you can 
modify the xml to point those to physical files that exist if you like (feel 
free to add comments/submit a patch if you like).
Note: the CDA preprocessor is only intended for incoming documents that are 
already well formed XML/CDA documents.  If it’s plaintext, I would suggest 
using the plaintext aggregates instead of CDA.

[1]
http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-preprocessor/desc/CdaCasInitializer.xml

From: Weiwei Zhang [mailto:[email protected]]
Sent: Monday, February 02, 2015 1:02 PM
To: [email protected]
Subject: Re: Collection Processing Engine (CPE) Exception, User Install

Hi Pei,

I want to follow up with you on the CPE Exception which was reported by me and 
another user last week. Here I pasted the stacktrace on the terminal when the 
error occurred to provide you with more clues of what could have happened. 
Please let me know if you have any questions or need more information to 
troubleshoot. Thanks a lot.

Best,
Vivian

Stacktrace:

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].
02 Feb 2015 09:50:51  INFO LvgCmdApiResourceImpl - Loading NLM Norm and Lvg 
with config file = 
/usr/local/apache-ctakes-3.2.0/resources/org/apache/ctakes/lvg/data/config/lvg.properties
02 Feb 2015 09:50:51  INFO LvgCmdApiResourceImpl -   config file absolute path 
= 
/usr/local/apache-ctakes-3.2.0/resources/org/apache/ctakes/lvg/data/config/lvg.properties
02 Feb 2015 09:50:51  INFO LvgCmdApiResourceImpl - cwd = 
/usr/local/apache-ctakes-3.2.0
02 Feb 2015 09:50:51  INFO LvgCmdApiResourceImpl - cd 
/usr/local/apache-ctakes-3.2.0/resources/org/apache/ctakes/lvg/
02 Feb 2015 09:50:53  INFO LvgCmdApiResourceImpl - cd 
/usr/local/apache-ctakes-3.2.0
org.apache.uima.resource.ResourceInitializationException: Initialization of CAS 
Processor with name "AggregateCdaProcessor" failed.
at 
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:83)
at 
org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine(UIMAFramework_impl.java:420)
at 
org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(UIMAFramework.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: 
Initialization of CAS Processor with name "AggregateCdaProcessor" failed.
at 
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1104)
at 
org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(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.java:127)
at 
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:75)
... 5 more
Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.<init>(File.java:418)
at 
org.apache.ctakes.core.resource.FileResourceImpl.load(FileResourceImpl.java:44)
at 
org.apache.uima.resource.impl.ResourceManager_impl.registerResource(ResourceManager_impl.java:603)
at 
org.apache.uima.resource.impl.ResourceManager_impl.initializeExternalResources(ResourceManager_impl.java:442)
at 
org.apache.uima.resource.Resource_ImplBase.initialize(Resource_ImplBase.java:153)
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:123)
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.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.produceResource(UIMAFramework.java:314)
at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:425)
at 
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1088)
... 9 more


On Thu, Jan 29, 2015 at 3:34 PM, Tol O. 
<[email protected]<mailto:[email protected]>> wrote:
Hi,
In the file desc/ctakes-preprocessor/desc/CdaCasInitializer.xml, I also 
replaced the empty typeSystemDescription tags (lines 35-38) with the proposed 
changes. The Exception is still happening, it did not work. I am also using the 
testpatient_cn_1.xml file.

On Thu, Jan 29, 2015 at 1:28 PM, Weiwei Zhang 
<[email protected]<mailto:[email protected]>> wrote:
Hi Pei,

I used the example test file listed on the User Install Guide - 
testpatient_cn_1.xml. So I guess it is XML/CDA file. The problem occurred in 
CPE, not CVD, just to clarify.

Thanks,
Vivian

On Thu, Jan 29, 2015 at 11:16 AM, Pei Chen 
<[email protected]<mailto:[email protected]>> wrote:
Vivian,
Just curious - Are your input files XML/CDA format or plaintext?

--Pei

On Thu, Jan 29, 2015 at 2:04 PM, Weiwei Zhang 
<[email protected]<mailto:[email protected]>> wrote:
Hi Pei,

Thank you for your response. I added the imports to the CdaCasInitializer 
descriptor but I am still getting the same error as follows,

[Inline image 1]

There might be something going wrong with "AggregateCdaProcessor".

Thank you,
Vivian


On Thu, Jan 29, 2015 at 9:37 AM, Pei Chen 
<[email protected]<mailto:[email protected]>> wrote:
Try adding the below to the earliest defined primitive descriptor? [1][2]
<typeSystemDescription>
       <imports>

<import name="org.apache.ctakes.typesystem.types.TypeSystem"/>
     </imports>
</typeSystemDescription>

Normally I think this is already added in SegementAnnotator…  Feel free to 
create a Jira (steps to replicate the issue, and where you placed the fix so it 
can be addressed in the next patch).
Side note: I think we should DELETE all existing xml Descriptors (very 
difficult to maintain and test all combinations).  And recreate only the 
necessary ones via uimaFIT.

[1] 
http://mail-archives.apache.org/mod_mbox/ctakes-user/201311.mbox/%[email protected]%3E<https://urldefense.proofpoint.com/v2/url?u=http-3A__mail-2Darchives.apache.org_mod-5Fmbox_ctakes-2Duser_201311.mbox_-253C1384464005.90860.YahooMailNeo-40web140301.mail.bf1.yahoo.com-253E&d=BQMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WY&m=phDrlIb8RXczznm_ezqhWlv4EGIEnc2GYw0Fj4NMmuU&s=9u-Ny2tVLKjy8gWrOM8Da5NtKStucQ25e-he1GSrFc0&e=>
[2] 
http://mail-archives.apache.org/mod_mbox/ctakes-user/201403.mbox/%3CCAPqz87oUZ=hpzc_fo_zlaef3pvqcm9xsyums15iymgapsxx...@mail.gmail.com%3E<https://urldefense.proofpoint.com/v2/url?u=http-3A__mail-2Darchives.apache.org_mod-5Fmbox_ctakes-2Duser_201403.mbox_-253CCAPqz87oUZ-3DhPzc-5FFo-5FZLaEf3PVQcm9xSYuMs15iyMgapsxX9gg-40mail.gmail.com-253E&d=BQMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WY&m=phDrlIb8RXczznm_ezqhWlv4EGIEnc2GYw0Fj4NMmuU&s=t1X3ezcjSERYZ4_MyDNloaMuiV5Z1KFBwbTNa-TIRVM&e=>

On Wed, Jan 28, 2015 at 3:46 PM, Weiwei Zhang 
<[email protected]<mailto:[email protected]>> wrote:
Hello there,

I encountered the same error as Tol when running CPE in Apache cTakes.

Thank you,
Vivian

On Wed, Jan 28, 2015 at 12:04 PM, Tol O. 
<[email protected]<mailto:[email protected]>> wrote:
I just tried this test_plaintext.xml file as the CPE descriptor with the sample 
file placed in the testdata folder mentioned in the tutorial and (set the input 
directory in the GUI to the testdata folder):
https://svn.apache.org/repos/asf/ctakes/branches/ctakes-3.1.0/ctakes-clinical-pipeline/src/test/data/testpatient_cn_1.xml<https://urldefense.proofpoint.com/v2/url?u=https-3A__svn.apache.org_repos_asf_ctakes_branches_ctakes-2D3.1.0_ctakes-2Dclinical-2Dpipeline_src_test_data_testpatient-5Fcn-5F1.xml&d=BQMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WY&m=phDrlIb8RXczznm_ezqhWlv4EGIEnc2GYw0Fj4NMmuU&s=kqXz4fH23jjkM0Fv9s20tNJtH03nyWe51sxRHMbcdUc&e=>
The Error window I am getting states "org.apache.uima.cas.CASRuntimeException: 
Jcas type
"org.apache.ctakes.typesystem.type.structured.DocumentID" used in Java code, 
but was not declared in the XML type descriptor.
So still no luck, do you have any other suggestions?

Tol




On Wed, Jan 28, 2015 at 1:42 PM, britt fitch 
<[email protected]<mailto:[email protected]>> 
wrote:
Hi Tol, you might prefer to try the test_plaintext.xml CPE instead of the CDA 
one:
http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-clinical-pipeline/desc/collection_processing_engine/test_plaintext.xml<https://urldefense.proofpoint.com/v2/url?u=http-3A__svn.apache.org_repos_asf_ctakes_trunk_ctakes-2Dclinical-2Dpipeline_desc_collection-5Fprocessing-5Fengine_test-5Fplaintext.xml&d=BQMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WY&m=phDrlIb8RXczznm_ezqhWlv4EGIEnc2GYw0Fj4NMmuU&s=NuPyO2DcLscxB6E0cq5WWSm_I5DJNgc9bO9Uoqgphlg&e=>

Cheers,

Britt









Britt Fitch
Wired Informatics
265 Franklin St Ste 1702
Boston, MA 02110
http://wiredinformatics.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__wiredinformatics.com&d=BQMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WY&m=phDrlIb8RXczznm_ezqhWlv4EGIEnc2GYw0Fj4NMmuU&s=BJl8sK_6O0Xd0mnWdV8aOJy7pXtg_PBFHwwjZd9QXNc&e=>
[email protected]<mailto:[email protected]>

On Jan 28, 2015, at 2:25 PM, Tol O. <[email protected]<mailto:[email protected]>> 
wrote:

Hi,

I am following the cTAKES 3.2 User Install Guide with cTAKES 3.2.1 using Linux 
and Java 8.
At step 8 of the Collection Processing Engine (CPE) (click the play button) I 
am get an error message:
"org.apache.uima.resource.ResourceInitializationException: Initialization of 
CAS Processor with name "AggregateCdaProcessor" failed. [...] Caused by: 
java.lang.IllegalArgumentException: URI is not hierarchical."
I read a bit on this mailing list and saw that other people also encountered 
such or a similar error. I followed the install guide step by step and 
extracted/copied the cTAKES resources folder over the already existing 
resources folder of cTAKES.

Does anybody know how to fix this Exception problem to run the Collection 
Processing Engine (CPE)?
Many thanks!









Reply via email to