Author |
Message
|
dinesh_s |
Posted: Wed Nov 09, 2005 3:00 am Post subject: javax.jms.JMSException: MQJMS2005: failed to create MQQueueM |
|
|
Newbie
Joined: 09 Nov 2005 Posts: 3
|
I have a queue manager/ set of queues and a lDAP directory server on Machine A. I have bound the queue Manager/queues to LDAP using JMSAdmin.
I have a client program on Machine B which makes jndi lookup on Dir server on Machine B and tries to get queue connection and send a message.
But im getting the following exception..
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for ''
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:434)
at com.ibm.mq.jms.MQQueueConnection.createQM(MQQueueConnection.java:479)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:183)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:6
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection
Im stuck here.... If anybody can assist me on this.. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Nov 09, 2005 3:05 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
dinesh_s |
Posted: Wed Nov 09, 2005 4:25 am Post subject: |
|
|
Newbie
Joined: 09 Nov 2005 Posts: 3
|
Im trying to use the vendor-neutral connection method by binding the QueueManager and Queues on remote host to LDAP and then accessing it using JMS Client program on a different host. This is the code i have.
String factoryName = "cn=QueueManager";
String txQueueName = "cn=ErrorQueue";
try {
QueueConnectionFactory queueConnectionFactory =
(QueueConnectionFactory) getLdapContext().lookup(factoryName);
myQueueConnection = queueConnectionFactory.createQueueConnection();
myQueueSession =
myQueueConnection.createQueueSession(
false,
Session.CLIENT_ACKNOWLEDGE);
Queue txQueue = (Queue) getLdapContext().lookup(txQueueName);
myQueueSender = myQueueSession.createSender(txQueue);
myQueueConnection.start();
TextMessage messageToSend = myQueueSession.createTextMessage();
messageToSend.setText(text);
myQueueSender.send(messageToSend);
this.disconnectFromMessageQueues();
System.out.println("Message sent");
Properties p = (Properties) getProperty();
} catch (Throwable e) {
e.printStackTrace();
} |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Nov 09, 2005 6:58 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
My guess is that you didn't specify a qmgr name in your JNDI QCF. If you didn't and are using a default queue manager, then my next guess is that you don't have your listener running or your QCF isn't setup to act as a WMQ client. |
|
Back to top |
|
 |
dinesh_s |
Posted: Wed Nov 09, 2005 11:06 pm Post subject: |
|
|
Newbie
Joined: 09 Nov 2005 Posts: 3
|
ThanX a lot.. I resolved the issue.
I missed out the "client access server connection channel definition" in my JMSAdmin service definition file.
Cheers Dinesh |
|
Back to top |
|
 |
|