uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A. Schaller <an.sch...@googlemail.com>
Subject Initialization of annotator class "foo" failed.
Date Mon, 22 Nov 2010 09:30:12 GMT
Hey together,

I am having troubles with UIMA running a AE Descriptor or CPE Descriptor. When I 
try to run one of these with run configuriation "UIMA Run AE", "UIMA Run CPE" or 
"UIMA CAS Visual Debugger" I get the error:

Caused by: org.apache.uima.resource.ResourceInitializationException: 
Initialization of annotator class "foo" failed.

Where foo is the corresponding *.java file. The strange thing is: When i am 
going through the RoomNumberAnnotator example (http://uima.apache.org/doc-uima-
annotator.html) everything works fine and compiles nicely.

But when i try to import an UIMA project into eclipse or try to build another 
UIMA app i am running into the mentioned error. For example i try to import the 
following UIMA project (which is pretty minimal. It simply implements a POS 
tagger with stanford's pos tagger): theknetgroup.org/lesson4.zip

This is what i do:

1. Set UIMA_HOME (export UIMA_HOME=/home/bin4ry/Tools/Dev/apache-uima
2. Open Eclipse set (once) UIMA_HOME: Windows --> Preferences -> Variables ...
3. New Project -> Java Project --> Name Lesson4
4. Right Click on this project --> properties --> UIMA CDE Property Page --> set

Data Path to "/home/bin4ry/workspace/Lesson4"
5. Right Click on this project --> Add UIMA Nature
6. Drag&Drop the extracted files from lesson4.zip into the corresponding project 
folders (desc, src).
7. Right Click on this project --> Configure Build Path --> Libraries --> Add 
Variable --> Select "UIMA_HOME" --> Extend ... --> Select uima-core.jar, uima-
cpe.jar, uima-document-annotation.jar | Add External JARs and select the 
downloaded stanford-postagger.jar 
(http://nlp.stanford.edu/software/tagger.shtml#Download)

---
All the code must go to 
Lesson4/src/de.tudarmstadt.ukp.teaching.tutorial.lesson4/PosTagger.java but this 
is not of interest here therefore i leave it out. The corresponding descriptor 
file resides in Lesson4/desc/annotator/lesson4/PosTagger.xml.
---
9. Open it with Component Descriptor Editor --> Type System --> remove all the 
listed types (if you view the source they are referred to by name not by 
location. This gives an error later on when running it with the debugger. The 
error states: "org.apache.uima.resource.ResourceInitializationException: An 
import could not be resolved. No xml file with name "desc.type.lesson4.Pos" was 
found in the class path or data path. ..." Maybe this is another hint to the 
whole problem?) --> add --> Import by location (Lesson4/desc/type/Sentence.xml &

Token.xml as well as Lesson4/desc/type/lesson4/Pos.xml)

9. Run --> Run Configurations --> UIMA CAS Visual Debugger --> Classpath --> 
User Entries --> Add project --> Lesson4 | Add External JARs --> select 
stanford-postagger.jar --> Apply --> Run
10. Now I load the Descriptor xml file with Run --> Load AE and I browse to 
/home/bin4ry/workspace/Lesson4/desc/annotator/lesson4/PosTagger.xml
11. ERROR: org.apache.uima.resource.ResourceInitializationException: 
Initialization of annotator class 
"de.tudarmstadt.ukp.teaching.tutorial.lesson4.PosTagger" failed. 


What the heck i'm doing wrong? I tried this on Ubuntu 10.10 (even Win 7) with 
java-6-sun and java-6-openjdk etc. I know that UIMA is setup correctly since 
RoomNumberAnnotator works fine. There must be a little parameter configured 
wrong. Help please...this drives me crazy.


Mime
View raw message