Thanks Marshall. You are right. I should use CDE.
I used uimaj-examples as an eclipse project. It is weird. If classpath was not correct, then the Descriptor should be not running. However, all examples are running correctly in the same setup environment. Xue-Feng ________________________________ From: Marshall Schor <[email protected]> To: [email protected] Sent: Saturday, October 15, 2011 5:09:38 PM Subject: Re: ResourceInitializationException in CAS Editor in eclipse indigo 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? -Marshall 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 >
