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 QeueBrowser). 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:
[tt]
/* 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();
[/tt]
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:
[tt]
[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)
[/tt]
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.
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 QeueBrowser). 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:
[tt]
/* 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();
[/tt]
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:
[tt]
[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)
[/tt]
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.