This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes javax. jms. InvalidDestinationException: MQJMS0003 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "javax. jms. InvalidDestinationException: MQJMS0003" Watch "javax. jms. InvalidDestinationException: MQJMS0003" New topic
Author

javax. jms. InvalidDestinationException: MQJMS0003

Ondrej Babuljak
Greenhorn

Joined: Mar 11, 2005
Posts: 8
<html><head/><body>
Hi,
<p>
I'm becoming desperate because of this problem. If you have any idea please post it here.
</p>
<p>
I develop a web application which is intended to communicate with other apps via MQ. I work in Websphere Studio AD 5. 0 and the application should run on Websphere Application Server 5. 1. WAS should act only as a MQ client - the provider is Websphere MQ 5. 3 CSD09 running on the same machine.
</p>
<p>
For working with MQ I have a class called MQAccessor, which has a <tt>sender</tt> (a QueueSender object), a <tt>receiver</tt> (a QueueReceiver) and a <tt>browser</tt> (a QueueBrowser). It initializes these objects in its constructor. For this it uses a QueueConnectionFactory object and Queue objects held on the server and accessible through JNDI.
The important part of the constructor code is bellow:
</p>
<p>
<pre>
/* create session */
QueueConnectionFactory factory = (QueueConnectionFactory) context. lookup(queueConnectionFactoryJNDIName);
connection = factory. createQueueConnection();
session = connection. createQueueSession(true, Session. AUTO_ACKNOWLEDGE);

/* find queues in JNDI */
Queue inQueue = null;
Queue outQueue = null;
if(inQueueJNDIName != null){
inQueue = (Queue) context. lookup(inQueueJNDIName);
}
if(outQueueJNDIName != null){
outQueue = (Queue) context. lookup(outQueueJNDIName);
((MQQueue)outQueue). setTargetClient(JMSC. MQJMS_CLIENT_NONJMS_MQ);
}

/* create sender/receiver/browser */
if(inQueue != null){
receiver = session. createReceiver(inQueue);
browser = session. createBrowser(inQueue);
}
if(outQueue != null){
sender = session. createSender(outQueue);
}

/* start connection */
connection. start();
</pre>
</p>
<p>
OK, now the problem: when I deploy the application on the server (WAS 5. 1 as written above) the method <tt>session. createRecever()</tt> (or <tt>session. createSender()</tt>, when <tt>inQueue</tt> is <tt>null</tt> throws the exception <b>javax. jms. InvalidDestinationException: MQJMS0003: Destination not understood or no longer valid</b>. There are two wierd things about it:
</p>
<p>1, When I lookup the same Queue object with another application which uses nearly the same class for working with MQ everything is OK. Therefore I think the Queue should be valid.
</p>
<p>2, When I run the application on the test server integrated in WSAD with the same objects defined everything works fine!
</p>
<p>
Especially the second thing is really wierd - if it runs properly on the test server in WSAD why the hell it fails on the WAS?
</p>
<p>
The exception stacktrace follows:
</p>
<p><pre>
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R javax. jms. InvalidDestinationException: MQJMS0003: Destination not understood or no longer valid
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at com. ibm. mq. jms. MQSession. createQReceiver(MQSession. java:5722)
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at com. ibm. mq. jms. MQQueueSession. createReceiver(MQQueueSession. java:293)
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at com. ibm. mq. jms. MQQueueSession. createReceiver(MQQueueSession. java:272)
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at com. ibm. ejs. jms. JMSQueueReceiverHandle. <init>(JMSQueueReceiverHandle. java:84)
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at com. ibm. ejs. jms. JMSQueueSessionHandle. createReceiver(JMSQueueSessionHandle. java:144)
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at cz. empire. mq4db. componentpart. MQAccessor. <init>(MQAccessor. java:72)
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at cz. empire. mq4db. ComponentBase. initComponent(ComponentBase. java:283)
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at cz. empire. mq4db. ComponentSynchronized. mainLoop(ComponentSynchronized. java:32)
[10. 3. 05 14:49:19:180 SEČ] 1c3ea0ea SystemErr R at cz. empire. mq4db. ComponentThread. run(ComponentThread. java:35)
</pre></p>
<p>
It's my third day I try to solve the problem and it's really frustrating so as I said, if you have <b>any idea</b> please post it. Thanks a lot.
</p>

</body></html>
Ondrej Babuljak
Greenhorn

Joined: Mar 11, 2005
Posts: 8
Sorry - i wrote html instead of ubb. Now it should be correct

Hi,

I'm becoming desperate because of this problem. If you have any idea please post it here.


I develop a web application which is intended to communicate with other apps via MQ. I work in Websphere Studio AD 5.0 and the application should run on Websphere Application Server 5.1. WAS should act only as a MQ client - the provider is Websphere MQ 5.3 CSD09 running on the same machine.


For working with MQ I have a class called MQAccessor, which has a sender (a QueueSender object), a receiver (a QueueReceiver) and a browser (a QueueBrowser). It initializes these objects in its constructor. For this it uses a QueueConnectionFactory object and Queue objects held on the server and accessible through JNDI.
The important part of the constructor code is bellow:





OK, now the problem: when I deploy the application on the server (WAS 5.1 as written above) the method session.createRecever() (or session.createSender(), when inQueue is null) throws the exception javax.jms.InvalidDestinationException: MQJMS0003: Destination not understood or no longer valid. There are two wierd things about it:

1, When I lookup the same Queue object with another application which uses nearly the same class for working with MQ everything is OK. Therefore I think the Queue should be valid.

2, When I run the application on the test server integrated in WSAD with the same objects defined everything works fine!


Especially the second thing is really wierd - if it runs properly on the test server in WSAD why the hell it fails on the WAS?


The exception stacktrace follows:



It's my third day I try to solve the problem and it's really frustrating so as I said, if you have any idea please post it. Thanks a lot.
 
Consider Paul's rocket mass heater.
 
subject: javax. jms. InvalidDestinationException: MQJMS0003