It might be this simple:

The error message says it can't find the resource:

org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl

Your Jar dump at the bottom shows the Jar has

DictionaryResource_impl.xml

So, perhaps you need to put this resource in subdirectories so that it's found 
at org.apache... etc., or you maybe could change the xml descriptor which 
specifies where this resource is, eliminating the "org.apache..." prefix in 
front of DictionaryResource_impl.

This is just a shotgun guess - but maybe worth a try.

-Marshall 


On 11/30/2015 4:40 PM, Stephan Zednik wrote:
> Hi,
>
> I am having trouble running the ConceptMapper annotator via the Document 
> Analyzer application.
>
> UIMA version: 2.8.1
> github fork of UIMA-addons: https://github.com/zednis/uima-addons
> java: 1.8.0_45
>
> I have made slight updates to the add-on annotator pom files so they will 
> successfully build with Java 8.
>
> I also updated the imports of the ConceptMapperOffsetTokenizer.xml to be 
> references to XML files in the same directory (see 
> https://github.com/zednis/uima-addons/blob/trunk/ConceptMapper/desc/analysis_engine/primitive/ConceptMapperOffsetTokenizer.xml)
>
> I built a PEAR archive of the ConceptMapper annotator using `mvn package` and 
> I used $UIMA_HOME/bin/runPearInstaller.sh to install the ConceptMapper 
> annotator at /opt/apache-uima/test/ConceptMapper.
>
> I am attempting to use the ConceptMapper annotator with the Document Analyzer 
> application.  I have updated the fileUrl for the dictionary to 
> file:///opt/apache-uima/test/ConceptMapper/resources/dict/testDict.xml in the 
> installed annotator.
>
> I have specified the following Analysis Engine descriptor location: 
>
> /opt/apache-uima/test/ConceptMapper/desc/analysis_engine/primitive/ConceptMapperOffsetTokenizer.xml
>
> When I run the document analyzer I get the following stacktrace:
>
> $ /opt/apache-uima/bin/documentAnalyzer.sh 
> org.apache.uima.resource.ResourceInitializationException: The class 
> org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl
>  could not be found. (Descriptor: 
> file:/opt/apache-uima/test/ConceptMapper/desc/analysis_engine/primitive/ConceptMapperOffsetTokenizer.xml)
>       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:457)
>       at 
> org.apache.uima.resource.Resource_ImplBase.initialize(Resource_ImplBase.java:193)
>       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:130)
>       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:429)
>       at 
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:373)
>       at 
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:186)
>       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:371)
>       at 
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1223)
>       at 
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1332)
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:264)
>       at 
> org.apache.uima.resource.impl.ResourceManager_impl.registerResource(ResourceManager_impl.java:600)
>       ... 18 more
>
> What confuses me about this is that the 
> org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl
>  class is in the installed annotator jarfile (uima-an-conceptMapper.jar).
>
> $ jar tf /opt/apache-uima/test/ConceptMapper/lib/uima-an-conceptMapper.jar | 
> grep DictionaryResource_impl
> org/apache/uima/conceptMapper/support/dictionaryResource/CompiledDictionaryResource_impl.class
> org/apache/uima/conceptMapper/support/dictionaryResource/DictionaryResource_impl$1.class
> org/apache/uima/conceptMapper/support/dictionaryResource/DictionaryResource_impl$DictEntriesByLength_impl$ReverseOrderIntegerComparator.class
> org/apache/uima/conceptMapper/support/dictionaryResource/DictionaryResource_impl$DictEntriesByLength_impl.class
> org/apache/uima/conceptMapper/support/dictionaryResource/DictionaryResource_impl$DictEntriesImpl.class
> org/apache/uima/conceptMapper/support/dictionaryResource/DictionaryResource_impl$DictEntryImpl.class
> org/apache/uima/conceptMapper/support/dictionaryResource/DictionaryResource_impl$DictLoader.class
> org/apache/uima/conceptMapper/support/dictionaryResource/DictionaryResource_impl.class
>
> Any ideas why this class would not be found by the document analyzer even 
> though it is in the jar?
>
> Thanks,
>
> Stephan Zednik
> zedn...@rpi.edu
>

Reply via email to