uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: Fwd: Error specifying a relative path while using PEAR installer
Date Thu, 10 Sep 2009 13:36:26 GMT
Ahmed Abdeen Hamed wrote:
> Thank you Marshall. That was very helpful. I replaced the absolute
> path with a variable as the reference manual instructed but I am
> getting this error below. I made sure no UIMA jars are in the lib
> directory:
>   
It looks like the PEAR is finding UIMA framework Jars in a different
place than the non-PEAR version of things.
The general help here is to re-inspect things to see where UIMA Jars
might be found - they need to be found via only one class loader, and
cannot be found in any classpath specified to the UIMA ResourceManager.

For more specific help, we would need to see more details of your
classpath setup, and how you are using Resource Managers.

-Marshall
> Verification of ontotator-model-plugin failed =>
>  org.apache.uima.resource.ResourceInitializationException: The class
> org.apache.uima.conceptMapper.support.tokenizer.OffsetTokenizer is not
> a valid Analysis Component.  You must specify an Annotator, CAS
> Consumer, Collection Reader, or CAS Multiplier. If you are calling
> ResourceManager.setExtensionClassPath, this error can also be caused
> if you have put UIMA framework jar files on the extension classpath,
> which is not allowed. (Descriptor:
> file:/Users/ahamed/Projects/workspace/ontotator-model-plugin/src/onto/resources/descriptors/analysis_engine/primitive/OffsetTokenizer.xml)
> 	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:216)
> 	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:157)
> 	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:258)
> 	at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:352)
> 	at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:243)
> 	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:413)
> 	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:361)
> 	at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:183)
> 	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:258)
> 	at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:303)
> 	at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:383)
> 	at org.apache.uima.pear.tools.InstallationTester.testAnalysisEngine(InstallationTester.java:219)
> 	at org.apache.uima.pear.tools.InstallationTester.doTest(InstallationTester.java:114)
> 	at org.apache.uima.pear.tools.InstallationController.verifyComponentInstallation(InstallationController.java:1110)
> 	at org.apache.uima.pear.tools.InstallationController.verifyComponent(InstallationController.java:1993)
> 	at org.apache.uima.tools.pear.install.InstallPear.installPear(InstallPear.java:388)
> 	at org.apache.uima.tools.pear.install.InstallPear.access$000(InstallPear.java:79)
> 	at org.apache.uima.tools.pear.install.InstallPear$RunInstallation.run(InstallPear.java:108)
> 	at java.lang.Thread.run(Thread.java:637)
>
> Thanks,
> Ahmed
>
>
>
> On Wed, Sep 9, 2009 at 10:57 AM, Marshall Schor<msa@schor.com> wrote:
>   
>> Ahmed Abdeen Hamed wrote:
>>     
>>> Hello all,
>>> I sent the message below about three weeks ago and I am wondering if
>>> anyone had a chance to look into it. The EnglishSD.bin file is a model
>>> file that was part of the UIMA examples. I am calling it from a
>>> descriptor that my application is using using. However, I can't deploy
>>> the application unless I hard-code the path to point to an absolute
>>> path. This is an annoying problem that has been hunting me for over a
>>> year now. I would appreciate any help that ride me of it.
>>> Thanks!
>>> Ahmed
>>>
>>>       
>> Did you try using $main_root and/or $component_id$root?  You can search
>> the online reference docs for information about these and how to use them.
>>
>> -Marshall
>>     
>>> ---------- Forwarded message ----------
>>> From: Ahmed Abdeen Hamed <ahmed.elmasri@gmail.com>
>>> Date: Mon, Aug 17, 2009 at 5:21 PM
>>> Subject: Error specifying a relative path while using PEAR installer
>>> To: uima-user@incubator.apache.org
>>>
>>>
>>> Hello,
>>> I am receiving an error while specifying a relative path in
>>> configurationParameterSettings as follows:
>>>         <configurationParameterSettings>
>>>             <nameValuePair>
>>>                 <name>ModelFile</name>
>>>                 <value>
>>>                     <string>../../../models/EnglishSD.bin</string>
>>>                 </value>
>>>             </nameValuePair>
>>>         </configurationParameterSettings>
>>>
>>> The error happens because the string value is read verbatim as the
>>> PEAR installer fails to replace it by absolute path. Is there a way to
>>> use a different tag such as <fileUrl> where you still can specify a
>>> relative path?
>>>
>>> I would appreciate any assistance.
>>> Best wishes,
>>> Ahmed
>>>
>>>
>>>
>>>       
>
>
>   

Mime
View raw message