Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 451D418904 for ; Wed, 2 Dec 2015 14:29:51 +0000 (UTC) Received: (qmail 70843 invoked by uid 500); 2 Dec 2015 14:29:48 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 70674 invoked by uid 500); 2 Dec 2015 14:29:47 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 70663 invoked by uid 99); 2 Dec 2015 14:29:47 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2015 14:29:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 18B78C5E0B for ; Wed, 2 Dec 2015 14:29:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=6.31 tests=[URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id n1vD0a8W3-vm for ; Wed, 2 Dec 2015 14:29:35 +0000 (UTC) Received: from gateway20.websitewelcome.com (gateway20.websitewelcome.com [192.185.59.4]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 7712C204DE for ; Wed, 2 Dec 2015 14:29:34 +0000 (UTC) Received: by gateway20.websitewelcome.com (Postfix, from userid 500) id 4B2C33DD23E5C; Wed, 2 Dec 2015 08:29:33 -0600 (CST) Received: from gator3253.hostgator.com (gator3253.hostgator.com [198.57.247.217]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 3806E3DD23E1A for ; Wed, 2 Dec 2015 08:29:33 -0600 (CST) Received: from [129.34.20.19] (port=54301 helo=[9.2.55.58]) by gator3253.hostgator.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1a48PU-000Cjk-Fs for user@uima.apache.org; Wed, 02 Dec 2015 08:29:32 -0600 Subject: Re: Document Analyzer cannot find DictionaryResource_impl from ConceptMapper To: user@uima.apache.org References: <4F0368AB-9053-4AA1-87A6-CE5C1AD7016B@rpi.edu> From: Marshall Schor Message-ID: <565F004D.2040100@schor.com> Date: Wed, 2 Dec 2015 09:29:33 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <4F0368AB-9053-4AA1-87A6-CE5C1AD7016B@rpi.edu> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3253.hostgator.com X-AntiAbuse: Original Domain - uima.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-BWhitelist: no X-Source-IP: 129.34.20.19 X-Exim-ID: 1a48PU-000Cjk-Fs X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([9.2.55.58]) [129.34.20.19]:54301 X-Source-Auth: msa+schor.com X-Email-Count: 2 X-Source-Cap: bWlzY2hvcjttaXNjaG9yO2dhdG9yMzI1My5ob3N0Z2F0b3IuY29t 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 > zednis2@rpi.edu >