Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WLS 5.1 NullPointerException on createConnectionConsumer

1 view
Skip to first unread message

Lance A

unread,
May 17, 2000, 3:00:00 AM5/17/00
to
I'm encountering a NullPointerException while trying to create a server
session pool of listeners on a JMS queue during startup.
Any suggestions or am I missing something?

The line of code is as follows (all objects have been retrieved successfully
and the message selector is an empty non-null String):
connectionConsumer = queueConnection.createConnectionConsumer(poolQueue,
messageSelector,
serverSessionPool,
maxMessages);

which produces the following:
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:320)
at
weblogic.jms.server.JMSRegistry.getRegistrations(JMSRegistry.java:333)
at
weblogic.jms.server.JMSRegistry.addConnectionConsumer(JMSRegistry.java:200)
at
weblogic.jms.server.JMSConnection.createConnectionConsumer(JMSConnection.jav
a:179)
at
com.auctionlogic.weblogic.ServerSessionPoolBase.startup(ServerSessionPoolBas
e.java:152)
at
com.auctionlogic.weblogic.AuctionUpdatePool.startup(AuctionUpdatePool.java:4
2)
at weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:146)
at
weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)

Steven Pozarycki

unread,
May 17, 2000, 3:00:00 AM5/17/00
to
Lance,

The only thing I can think of is that there was a problem w/poolQueue (does the
Queue exist) or
there was a problem w/serverSessionPool. If you want you could send me the code
snippet and
I could take a look.

Thanks.

Steven Pozarycki

unread,
May 18, 2000, 3:00:00 AM5/18/00
to
Lance,

I'm pretty sure you are getting the NPE because the Queue you are using does not exist.  Was this created in the weblogic.properties file?  In your code are you doing something like this and ignoring the NamingException?

    try {
      queue = (Queue) ctx.lookup(queueName);
    } catch (NamingException ne) {}

I was able to reproduce the exact stack dump when the queue was not really there and this was passed to the createConnectionConsumer....

Thanks

0 new messages