Its funny, because I tried to export my project as PEAR Package, I could
install it, but still I got the same error.
My setenv.txt contains the "resource" folder:
CLASSPATH=D:/UIMA/myPears/myannotator/lib/myLib.jar;D:/UIMA/myPears/myannotator/bin;D:/UIMA/myPears/myannotator/resources;D:/UIMA/myPears/myannotator/lib/myLib.jar;
PATH=D:/UIMA/myPears/myannotator/bin
and under resources I have:
resources\myannotator\MyAnnotator_Messages.properties
but I'm still getting the "EXCEPTION MESSAGE LOCALIZATION FAILED"
exception with the CAS Visual Debugger.
What do you thing?
Is this basically the way that one can add localization support to a
Annotator? Or am I missing something?
Thank you,
Nikolay
Nikolay Georgiev wrote:
Hello everyone,
I'm just starting out with UIMA and tried to write my first Annotator
following the example from "Getting Started". I did it and then I wanted
to include throwing of ResourceInitializationException exceptions in the
initialize() method, for which I was required a MESSAGE_DIGEST.
I saw how it is done in the uimaj-examples, and made the following
changes to my code:
1. added the MESSAGE_DIGEST constant in the Annotator.
2. Made a new "resource" directory and added it to as a class folder of
my project in Eclipse.
3. In the "resource" directory I added the *MESSAGE.properties file
corresponding to the path of the MESSAGE_DIGEST constant.
Then I wanted to try out my annotator with the CAS Visual Debugger in
Eclipse and modified its RUN Configuration:
Under "Classpath"->"User Entries" I included my annotator project.
Then and run my annotator and when the annotator throws an exception I
get the following exception, saying that it can't find the message bundle:
====================================================
7/3/09 5:57:16 PM - 10:
org.apache.uima.tools.cvd.MainFrame.handleException(575): SEVERE:
EXCEPTION MESSAGE LOCALIZATION FAILED:
java.util.MissingResourceException: Can't find bundle for base name
somepackages.MyAnnotator_Messages, locale en_US
org.apache.uima.analysis_engine.AnalysisEngineProcessException:
EXCEPTION MESSAGE LOCALIZATION FAILED:
java.util.MissingResourceException: Can't find bundle for base name
somepackages.MyAnnotator_Messages, locale en_US
====================================================
I can debug my annotator, meaning that its class is already loaded. And
I have specified in my java project that I want the "resource" folder to
be a class folder. But somehow it can not find the bundle which is in
this folder.
Do you have some idea what could be the reason?
Thank you,
Nikolay