Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error -:MQJE001: Completion Code 2, Reason 2085

843830Sep 11 2007 — edited Sep 11 2007
Hi,

I am getting the following exception when I am trying to invoke a MDB through servlet.:-

The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMS$MyMdbConnectionFactory. The exception which was received is javax.jms.JMSException: MQJMS2008: failed to open MQ queue

[9/11/07 11:44:16:588 IST] 4dfb49e7 MDBListenerIm W WMSG0019E: Unable to start MDB Listener Hello, JMSDestination jms/MyMdbQueue : javax.jms.JMSException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:540)
at com.ibm.mq.jms.MQQueueAgent.resolveQueue(MQQueueAgent.java:460)
at com.ibm.mq.jms.MQQueueAgent.getQueueAgent(MQQueueAgent.java:271)
at com.ibm.mq.jms.MQConnectionBrowser.MQConnectionBrowserInit(MQConnectionBrowser.java:277)
at com.ibm.mq.jms.MQConnectionBrowser.<init>(MQConnectionBrowser.java:112)
at com.ibm.mq.jms.MQQueueConnection.createConnectionBrowser(MQQueueConnection.java:775)
at com.ibm.mq.jms.MQConnectionConsumer.<init>(MQConnectionConsumer.java:444)

*************************************************************************
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2085
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1527)
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1579)
at com.ibm.mq.jms.MQQueueAgent.resolveQueue(MQQueueAgent.java:451)
at com.ibm.mq.jms.MQQueueAgent.getQueueAgent(MQQueueAgent.java:271)
at com.ibm.mq.jms.MQConnectionBrowser.MQConnectionBrowserInit(MQConnectionBrowser.java:277)
at com.ibm.mq.jms.MQConnectionBrowser.<init>(MQConnectionBrowser.java:112)
at com.ibm.mq.jms.MQQueueConnection.createConnectionBrowser(MQQueueConnection.java:775)


I am trying to invoke an MDB thru servlet.I hve checked the QueueConnectionFactory Name,Queue Name,ListenerPort name

Following is the servlet code that invokes MDB
InitialContext context = new InitialContext();
						QueueConnectionFactory qConnectionFactory = (QueueConnectionFactory)context.lookup("java:comp/env/jms/MyConnectionFactoryRef");
						out.println(qConnectionFactory.toString());
						Queue queue = (Queue)context.lookup("java:comp/env/jms/MyQueueRef");
					        QueueConnection qConnection = qConnectionFactory.createQueueConnection();
						QueueSession qSession = qConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
						QueueSender sender = qSession.createSender(queue);
						TextMessage message = qSession.createTextMessage();
I am getting error on qSession.createSender(queue);
Can anyone please help me with this?

Regards,
Vandana

Comments

843830
Hi,
I too got the same exception a month back. The queue that you use is not configured in the MQ. So when you try to connect its giving this exception.
Check with the MQAdmin if the queue that you use is correct and is correctly configured.
You may be also connecting to the wrong queue.

with Regards
Rejoice Raja Jebamalaidass
843830
I only configured the queue on the server.I am actually new to MDB.
Does Configuring mean making an entry for Connection Factory,Queue name and also have enabled the MQ Simulator for Java Developers in JMS Provider section in the JMS tab in the server.?
I have done all that and I have also configured the listener port with the queue name and the connection factory on the server setting.

I have also provided the indirect resource reference in the webdeployment descriptot

Is there something like connection.start that is required to be done in the servlet?

Regards,
Vandana
843830
Guys,

No need to reply to this post.My issue is resolved.I have forgot to add my Queue name to teh server property.

Regards,
Vandana
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 9 2007
Added on Sep 11 2007
3 comments
12,023 views