uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: ResourceInitializationException in CAS Editor in eclipse indigo
Date Sat, 15 Oct 2011 21:09:38 GMT
Hi, Xue-Feng,

When you say you used the "CAS Editor", did you mean to say you used the
"Component Description Editor (CDE)"?  I think this is what you were running...,
and I'll assume that is the case in the rest of this reply :-) .

This message happens when you try to save a descriptor, and it won't
"validate".  The descriptor is saved, anyways, so this is like a warning that
something is not quite right.

If you read the message carefully, it says that "The Descriptor is invalid for
the following reason: ... Annotator class
"org.apache.uima.tutorial.ex1.RoomNumberAnnotator" was not found."

What UIMA tries to do when it validates a descriptor is to see if it can find
the Java class that the descriptor says has the implementation.  It does this by
looking it up on the classpath.  The class path used is set up to be whatever
the class path is for the Eclipse project where the descriptor is found.

So, if you were editing a descriptor in the eclipse project uimaj-examples it
would find this.  If you are editing a descriptor in some other eclipse project
"foo", you can avoid this kind of message by insuring the eclipse "build path"
for the "foo" project includes the uimaj-examples project.  This is because the
Java implementations for the example descriptors are in that project.

Does this help?


On 10/15/2011 4:57 PM, Xue-Feng Yang wrote:
> I didn't used CAS Editor to edit descriptors xml until today. I used an CAS Editor's
other features and used an XML Editor for XML copy/paste and modification. 
> Today, I met a strange thing. When I modified descriptors by CAS Editor, it threw an
exception. Then I played around. I found all examples in uima package had the same problem.
Here is the error message for example 1.
> The Descriptor is invalid for the following reason:
> ResourceInitializationException: Annotator class
> "org.apache.uima.tutorial.ex1.RoomNumberAnnotator" was not found(Descriptor:
> file:/C:/uima/examples/desciptors/tutorial/ex1/RoomNumber
> Annotator.xml)
> Caused by: ClassNotFoundExcption:
> org.apache.uima.tutorial.ex1.RoomNumberAnnotator
> I don't have any problem for using  CAS Editor's other features. The installation is
step by step to follow overview_and_setup.pdf except eclipse which was installed before.
> I am wondering if this is a problem in my developing environment. I use
> Eclipse Indigo
> Windows 7 64bits
> ThinkPad W520
> Xue-Feng

View raw message