users@glassfish.java.net

Re: Null pointer exception when attempting to deploy simple JMS application(s)

From: <glassfish_at_javadesktop.org>
Date: Fri, 01 Oct 2010 03:11:07 PDT

I had a quick look at the relevant part of the JavaEE tutorial at
http://download.oracle.com/javaee/5/tutorial/doc/bnbpo.html#bnbpp

I see that this configures the MDB's destination using annotation:

@MessageDriven(mappedName="jms/Queue")
public class SimpleMessageBean implements MessageListener {

where the mappedName attribute refers to the JNDI name of the destination from which messages are consumed ("jms/Queue" in this case). I see that the tutorial doesn't explain that.

I did a test just now with the "mappedName" attribute omitted. In this case the error was caught at a higher level:
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Error in Runtime DD: missing destination JNDI name

So It's not obvious to me why you got the lower-level error, and what you need to do to fix the problem (which shows that an error message certainly can't !) But I would check that annotation, and also check that the JNDI resource referred to does actually exist, perhaps using the admin console. Feel free to ask further questions.



Nigel
[Message sent by forum member 'nigeldeakin']

http://forums.java.net/jive/thread.jspa?messageID=484097