Thursday, September 22, 2011

java.util.MissingResourceException: No localizer class found for message id

While executing this code:

TopicConnectionFactory qcf = (TopicConnectionFactory) ctx.lookup( "my.connection.factory" );
TopicConnection topicConnection = qcf.createTopicConnection();

the thread hangs for 1 minute and then I get this great stacktrace:

Exception in thread "main" java.util.MissingResourceException: No localizer class found for message id.
at weblogic.i18ntools.L10nLookup.getLocalizer(
at weblogic.i18ntools.L10nLookup.getLocalizer(
at weblogic.i18n.logging.Loggable.getMessage(
at weblogic.i18n.logging.Loggable.getMessage(
at weblogic.jms.common.JMSException.(
at weblogic.jms.client.JMSConnectionFactory.setupJMSConnection(
at weblogic.jms.client.JMSConnectionFactory.createConnectionInternal(
at weblogic.jms.client.JMSConnectionFactory.createTopicConnection(
at durablesubscribers.Main.main(

I am running it using the classpath with
wlclient.jar and javax.jms_1.1.1.jar

The exception was due to the fact that I was trying to create a Durable Subscriber to a Distributed Topic, and not to an individual member...

Anyway L10nLookup needs and weblogic/i18n/ in the classpath. These files are included in most WebLogic modules (jars).

No comments: