uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Goetz <twgo...@gmx.de>
Subject Re: Bewildered
Date Wed, 05 Mar 2008 13:06:41 GMT
Wow, that's a lot of info.  We'll get to the bottom
of this.

First of all, in the descriptor, you need to specify
just the class name, without the ".java" source file
extension.  The way you specified it, the system is
looking for a class called "java" in package
org.apache.uima.DDD.Sensor, which I'm pretty sure is
not what you want.

Secondly, you have added to the classpath the directory
that contains the source code.  Unless the compiled
.class files live in the same directory, that's not
going to help.

The UIMA examples class files are packaged into a jar
and get on the classpath via
%UIMA_HOME%\lib\uima-examples.jar.

So all we need to figure out is how you compile your
java source code.  Are you doing this inside Eclipse?
If in Eclipse, you can a) export the code to a jar
file and add that to the classpath, or b) add the
directory where eclipse puts the compiled code to
the classpath (probably c:\apache-uima\examples\bin,
but check on your disk, look for .class files).

If not eclipse, i.e., the command line, then a plain
invocation of javac should have placed the .class files
next to the .java files, and adding c:\apache-uima\examples\src
to the classpath will work.

HTH,
Thilo

Dennis Geller wrote:
> Thanks, Thilo.
> 
> Here's the classpath definition from the .bat file (line breaks added 
> for this email)
> @rem All this nonsense is necessary to remove quotes from the CLASSPATH 
> and also handle the case where there is no CLASSPATH
> @set _NOQUOTES=%CLASSPATH:"=%
> @set _REALLYNOQUOTES=%_NOQUOTES:"=%
> @if "%_REALLYNOQUOTES%"=="=" set _REALLYNOQUOTES=
> set UIMA_CLASSPATH=%UIMA_CLASSPATH%;
> %UIMA_HOME%\examples\resources;
> %UIMA_HOME%\lib\uima-core.jar;
> %UIMA_HOME%\lib\uima-document-annotation.jar;
> %UIMA_HOME%\lib\uima-cpe.jar;
> %UIMA_HOME%\lib\uima-tools.jar;
> %UIMA_HOME%\lib\uima-examples.jar;
> %UIMA_HOME%\lib\uima-adapter-soap.jar;
> %UIMA_HOME%\lib\uima-adapter-vinci.jar;
> CATALINA_HOME%\webapps\axis\WEB-INF\lib\activation.jar;
> %CATALINA_HOME%\webapps\axis\WEB-INF\lib\axis.jar;
> %CATALINA_HOME%\webapps\axis\WEB-INF\lib\commons-discovery.jar;
> %CATALINA_HOME%\webapps\axis\WEB-INF\lib\commons-discovery-0.2.jar;
> %CATALINA_HOME%\webapps\axis\WEB-INF\lib\commons-logging.jar;
> %CATALINA_HOME%\webapps\axis\WEB-INF\lib\commons-logging-1.0.4.jar;
> %CATALINA_HOME%\webapps\axis\WEB-INF\lib\jaxrpc.jar;
> %CATALINA_HOME%\webapps\axis\WEB-INF\lib\mail.jar;
> %CATALINA_HOME%\webapps\axis\WEB-INF\lib\saaj.jar;
> %UIMA_HOME%\lib\jVinci.jar;%_REALLYNOQUOTES%;
> %UIMA_HOME%\examples\descriptors\DDD;
> %UIMA_HOME%\examples\src\org\apache\uima\DDD;
> %UIMA_HOME%\examples\src\org\apache\uima\DDD\Senseattributes
> 
> And here's the echo of the actual definition in the bat file
> 
> C:\apache-uima\bin>set 
> UIMA_CLASSPATH=;c:\apache-uima\examples\resources;c:\apac
> he-uima\lib\uima-core.jar;c:\apache-uima\lib\uima-document-annotation.jar;c:\apa
> che-uima\lib\uima-cpe.jar;c:\apache-uima\lib\uima-tools.jar;c:\apache-uima\lib\u
> ima-examples.jar;c:\apache-uima\lib\uima-adapter-soap.jar;c:\apache-uima\lib\uim
> a-adapter-vinci.jar;C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\webap
> ps\axis\WEB-INF\lib\activation.jar;C:\Program Files\Apache Software 
> Foundation\T
> omcat 6.0\webapps\axis\WEB-INF\lib\axis.jar;C:\Program Files\Apache 
> Software Fou
> ndation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\commons-discovery.jar;C:\Program Fil
> es\Apache Software Foundation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\commons-discov
> ery-0.2.jar;C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\webapps\axis\
> WEB-INF\lib\commons-logging.jar;C:\Program Files\Apache Software 
> Foundation\Tomc
> at 6.0\webapps\axis\WEB-INF\lib\commons-logging-1.0.4.jar;C:\Program 
> Files\Apach
> e Software Foundation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\jaxrpc.jar;C:\Program
> Files\Apache Software Foundation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\mail.jar;C:
> \Program Files\Apache Software Foundation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\sa
> aj.jar;c:\apache-uima\lib\jVinci.jar;.;C:\openrdf-sesame-2.0\lib\slf4j-jdk14-1.3
> .0.jar;C:\apache-log4j-1.2.15\log4j-1.2.15.jar;C:\openrdf-sesame-2.0\lib\openrdf
> -sesame-2.0-onejar.jar;c:\jaxb-ri-20071219\lib\jaxb-api.jar;C:\Program 
> Files\Jav
> a\jre1.6.0_03\lib\ext\QTJava.zip;c:\apache-uima\examples\descriptors\DDD;c:\apac
> he-uima\examples\src\org\apache\uima\DDD;c:\apache-uima\examples\src\org\apache\
> uima\DDD\Senseattributes
> 
> These don't seem to have the directory containing org (same org as in 
> the example) so I added it
> ;c:\apache-uima\examples\src;
> but no difference. I also added the actual org directory, but that was 
> clearly a desperation move, and also didn't help.
> 
> The file being specified in DocumentAnalyzer as the source is: 
> C:\apache-uima\examples\descriptors\DDD\SensorAnnotator.xml
> 
> Here's the Directory structure
> C:
>   apache-uima
>     examples
>       src
>         org
>           apache
>             uima
>               DDD
>                  Senseattributes
>       descriptors
>         DDD
> 
> And here's the entire exception
> 
> C:\apache-uima\bin>"C:\Program Files\Java\jre1.6.0_03\bin\java" -cp 
> ";c:\apache-
> uima\examples\resources;c:\apache-uima\lib\uima-core.jar;c:\apache-uima\lib\uima
> -document-annotation.jar;c:\apache-uima\lib\uima-cpe.jar;c:\apache-uima\lib\uima
> -tools.jar;c:\apache-uima\lib\uima-examples.jar;c:\apache-uima\lib\uima-adapter-
> soap.jar;c:\apache-uima\lib\uima-adapter-vinci.jar;C:\Program 
> Files\Apache Softw
> are Foundation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\activation.jar;C:\Program Fil
> es\Apache Software Foundation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\axis.jar;C:\Pr
> ogram Files\Apache Software Foundation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\commo
> ns-discovery.jar;C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\webapps\
> axis\WEB-INF\lib\commons-discovery-0.2.jar;C:\Program Files\Apache 
> Software Foun
> dation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\commons-logging.jar;C:\Program Files\
> Apache Software Foundation\Tomcat 
> 6.0\webapps\axis\WEB-INF\lib\commons-logging-1
> .0.4.jar;C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\webapps\axis\WEB
> -INF\lib\jaxrpc.jar;C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\webap
> ps\axis\WEB-INF\lib\mail.jar;C:\Program Files\Apache Software 
> Foundation\Tomcat
> 6.0\webapps\axis\WEB-INF\lib\saaj.jar;c:\apache-uima\lib\jVinci.jar;.;C:\openrdf
> -sesame-2.0\lib\slf4j-jdk14-1.3.0.jar;C:\apache-log4j-1.2.15\log4j-1.2.15.jar;C:
> \openrdf-sesame-2.0\lib\openrdf-sesame-2.0-onejar.jar;c:\jaxb-ri-20071219\lib\ja
> xb-api.jar;C:\Program 
> Files\Java\jre1.6.0_03\lib\ext\QTJava.zip;c:\apache-uima\e
> xamples\descriptors\DDD;c:\apache-uima\examples\src\org\apache\uima\DDD;c:\apach
> e-uima\examples\src\org\apache\uima\DDD\Senseattributes;c:\apache-uima\examples\
> src;c:\apache-uima\examples\src\org;" "-Duima.home=c:\apache-uima" 
> "-Duima.datap
> ath=" -DVNS_HOST=localhost -DVNS_PORT=9000 
> "-Djava.util.logging.config.file=c:\a
> pache-uima\config\Logger.properties" -Xms128M -Xmx800M 
> org.apache.uima.tools.doc
> analyzer.DocumentAnalyzer
> org.apache.uima.resource.ResourceInitializationException: Annotator 
> class "org.a
> pache.uima.DDD.Sensor.java" was not found. (Descriptor: 
> file:/C:/apache-uima/exa
> mples/descriptors/DDD/SensorAnnotator.xml)
>         at 
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.ini
> tializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:202)
>         at 
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.ini
> tialize(PrimitiveAnalysisEngine_impl.java:151)
>         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:258)
> 
>         at 
> org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.jav
> a: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.ini
> tASB(AggregateAnalysisEngine_impl.java:413)
>         at 
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.ini
> tializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:361)
>         at 
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.ini
> tialize(AggregateAnalysisEngine_impl.java:183)
>         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:258)
> 
>         at 
> org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.jav
> a:326)
>         at 
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThrea
> d(DocumentAnalyzer.java:1167)
>         at 
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.r
> un(DocumentAnalyzer.java:1267)
> Caused by: java.lang.ClassNotFoundException: org.apache.uima.DDD.Sensor.java
>         at java.net.URLClassLoader$1.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Unknown Source)
>         at 
> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.ini
> tializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:199)
>         ... 15 more
> 
> 
> Here's the descriptor file
> <?xml version="1.0" encoding="UTF-8"?>
> <analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
>   <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
>   <primitive>true</primitive>
>   
> <annotatorImplementationName>org.apache.uima.DDD.Sensor.java</annotatorImplementationName>
>   <analysisEngineMetaData>
>     <name>Sensor Annotator</name>
>     <description>An example annotator that searches for sensor 
> definitions in a DDD script</description>
>     <version>1.0</version>
>     <vendor>The Apache Software Foundation</vendor>
>     <configurationParameters/>
>     <configurationParameterSettings/>
>     <typeSystemDescription>
>       <imports>
>         <import name="DDDTypeSystem"/>
>       </imports>
>     </typeSystemDescription>
>     <typePriorities/>
>     <fsIndexCollection/>
>     <capabilities>
>       <capability>
>         <inputs/>
>         <outputs>
>           <type>org.apache.uima.DDD.Sensor</type>
>           <feature>org.apache.uima.DDD.Sensor:name</feature>
>         </outputs>
>         <languagesSupported/>
>       </capability>
>     </capabilities>
>     <operationalProperties>
>       <modifiesCas>true</modifiesCas>
>       <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
>       <outputsNewCASes>false</outputsNewCASes>
>     </operationalProperties>
>   </analysisEngineMetaData>
>   <resourceManagerConfiguration/>
> </analysisEngineDescription>
> 
> Anything else I should provide?
> 
> Dennis
>              
> 
> ***********************************
> Dennis Geller, Ph.D. Computer and Communication Science
> Senior Software Developer
> Direct Dial: 781.496.2461 Main Number: 781.935.3966 ext. 261
> Fax Number: 781.496-2498
> E-mail: dgeller@aptima.com
> Aptima, Inc.
> 12 Gill Street, Suite 1400
> Woburn, MA 01801 USA
> http://www.aptima.com
> ************************************
> 
> The information transmitted is intended only for the person or entity to which it is
addressed and may contain confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon this information by
persons or entities other than the intended recipient is prohibited. If you received this
in error, please contact the sender and delete the material from any computer.

Mime
View raw message