Jörn Kottmann wrote: > Marshall Schor wrote: >> Jörn Kottmann wrote: >> >>> Hello, >>> >>> on our sever message localization always fails with this error message: >>> MESSAGE LOCALIZATION FAILED: Can't find bundle for base name >>> jms_adapter_messages, locale en_DK >>> >>> This is a little annoying because even in case it fails it should just >>> use english error messages, >>> and if that fails the key of the error message is better than nothing. >>> >>> Should I open a jira ? >>> >> The localization code already is trying various variations, down to the >> "base name" by itself. It's the Java standard "getBundle" in the >> standard Java class ResourceBundle. The base name here is >> jms_adapter_messages, and there is supposed to be a >> jms_adapter_messages.properties file on the classpath (it's in >> uimaj-as-jms project, in src/main/resources). >> >> Can you find out why this is not on the classpath? >> > The exception was thrown in the our UIMA AS client which is running > in an OSGI server using the uima as osgi bundle. Who exactly is trying > to load the message file from the classpath ? > > I guess thats done in the uima core
Right. it's in org.apache.uima.internal.util.I18nUtil. > and uima core cannot see the classpath > of the uima as bundle. This would explain why it fails in an osgi > environment. > Yes. This is a common problem for OSGi packaging with logging. In the Eclipse/OSGi environment, we "get around" this issue using buddy class-loading. Google: osgi logging classpath buddy to see a bunch of posts about this issue. Here's a post by Mirko Jahn which includes a part describing a way to extend the implementation to handle this more directly (see 2nd article): http://osgi.mjahn.net/category/specifications/ If anyone has the time and interest, it would be good to explore this to see if we can come up with a way to make UIMA more OSGi - friendly in this aspect. Would a simple work-around be to change the osgi setup you're using so that the base uima bundle can "see" the uima-as bundle? -Marshall > Jörn > >