Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

javax. jms. InvalidDestinationException: MQJMS0003

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic