File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes JMS Message Destination Reference Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS Message Destination Reference Exception" Watch "JMS Message Destination Reference Exception" New topic
Author

JMS Message Destination Reference Exception

Jack Bush
Ranch Hand

Joined: Oct 20, 2006
Posts: 235
Hi All,

I am encountering the following exception when trying to test out a simple JMS exercise from chapter 8 (Messaging with JMS & Message Driven Beans) from Java EE 5 Development with Netbeans book:

Copying 1 file to C:\Documents and Settings\abc\JMSEnterpriseProject\dist
07/05/2009 7:17:56 AM com.sun.enterprise.deployment.util.ComponentValidator accept
WARNING: "DPL8007: Invalid Deployment Descriptors element message-destination value null"
07/05/2009 7:17:56 AM com.sun.enterprise.deployment.util.ComponentValidator accept
WARNING: "DPL8007: Invalid Deployment Descriptors element message-destination value null"
07/05/2009 7:17:56 AM com.sun.enterprise.naming.NamingManagerImpl bindObjects
SEVERE: NAM0007 : Message Destination Reference java:comp/env/jms/myQueue has not been linked to a Message Destination
07/05/2009 7:17:56 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC003: Application threw an exception.
javax.naming.NamingException: Message Destination Reference java:comp/env/jms/myQueue has not been resolved
at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:521)
at com.sun.enterprise.appclient.AppContainer.preInvoke(AppContainer.java:146)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:383)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
07/05/2009 7:17:56 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC010: Make sure the server port is not disabled and that you are looking up a valid name
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Message Destination Reference java:comp/env/jms/myQueue has not been resolved
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:487)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: javax.naming.NamingException: Message Destination Reference java:comp/env/jms/myQueue has not been resolved
at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:521)
at com.sun.enterprise.appclient.AppContainer.preInvoke(AppContainer.java:146)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:383)
... 2 more
Java Result: 1
run-JMSEnterpriseProject-app-client:
run:

Below are the relevant codes to send and receive messages:


Both "jms/myQueue" and "jms/myQueueConnectionFactory" have already been created by Glassfish by default and is visible on both Admin Console/Netbeans => Service => JMS Resource.

I am running jdk1.6.0_12, Netbeans 6.5, Glassfish v2r2 on Windows XP.
Any assistance would be much appreciated.
Thanks,
Jack
Jack Bush
Ranch Hand

Joined: Oct 20, 2006
Posts: 235
Hi All,

I have made the following changes to injecting resources in ApplicationClient which was advised by the book:



Below is a different type of error messages being produced:

08/05/2009 12:01:21 AM com.sun.enterprise.naming.NamingManagerImpl bindObjects
SEVERE: NAM0008 : Invalid Destination: jms/GlassFishBookQueue for java:comp/env/jmsenterpriseproject.ApplicationClient/glassfishbookQueue
08/05/2009 12:01:21 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC003: Application threw an exception.
javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]

Below is the server log which indicated why this issue is occurring:

CORE5021: Application NOT loaded: [jmsra]
RAR6028 : This adapter is not 1.5 compliant : jms/myQueue
failed to load resources/ResourceAdapter
com.sun.enterprise.connectors.ConnectorRuntimeException: This adapter is not 1.5 compliant

I tried to create a new connection factory (jms/GlassFishBookConnectionFactory) and message queue (jms/GlassFishBookQueue) without making a difference.

Any ideas on how to resolve this issue?

Thanks a lot,

Jack
Jack Bush
Ranch Hand

Joined: Oct 20, 2006
Posts: 235
Hi All,

By completely removing both Netbeans 6.5 and Glassfish v2.0 before re-installing Netbeans 6.5.1 and Glassfish v2.1 resolved this issue.

It may also have been due to Glassfish v2.0 being corrupted/not installed properly as it would display a list of possibility of why Glassfish did not startup correctly after every startup, even though the server does eventually come up after refreshing Glassfish server under service tab.

The Add Server menu on Netbeans 6.5.1 is working compared to 6.5.

Jack
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS Message Destination Reference Exception
 
Similar Threads
can I integrate JMS with Servlets???
Message Driven Beans
Servlets, MDB and OC4J
MDB
A simple JNDI question....