Author |
Message
|
niraj.chaudhary |
Posted: Wed Apr 02, 2008 2:54 am Post subject: amqsput and amqsget successful, JMS unable to connect |
|
|
Novice
Joined: 20 Jun 2007 Posts: 22 Location: UK
|
Hi all,
I have MQ server 6.0 on one machine (solaris) and MQ 6.0 client on another (solaris too). From the client machine, whenever I am trying to do amqsput or amqsget, the attempt is succesful. But, my JMS appication is unable to connect to the queue manager. I am getting following error:
JMSException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'QM.CSPRBST1'
Linked exception: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2058
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2058
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at com.ibm.mq.MQException.<init>(MQException.java:1288)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:228)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:179)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:215)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:84)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(Compiled Code)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:773)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:698)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:658)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(Compiled Code)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:527)
at com.ibm.mq.MQSPIQueueManager.<init>(MQSPIQueueManager.java:69)
at com.ibm.mq.jms.MQConnection.createQM(Compiled Code)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1703)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:157)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:67)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:171)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)
at mqjmsput.myUserPut(mqjmsput.java:210)
at mqjmsput.main(mqjmsput.java:279)
I am using a .bindings file as JNDI provider and it is working fine, if I am using the same file on the machine as MQ server one.
Can anyone help me?
Thanks in anticipation..
NC |
|
Back to top |
|
 |
mvic |
Posted: Wed Apr 02, 2008 3:11 am Post subject: Re: amqsput and amqsget successful, JMS unable to connect |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Is the program attempting to use a server-bound connection? Should it be attempting to use a client-bound connection? |
|
Back to top |
|
 |
niraj.chaudhary |
Posted: Wed Apr 02, 2008 4:36 am Post subject: |
|
|
Novice
Joined: 20 Jun 2007 Posts: 22 Location: UK
|
Hi mvic,
How do you know that your program is using server-bound connection or client bound one? Will there be any change in .bindings file, if it is used for client bound compared to the one which was used for server bound connection?
I have not explicitly set any thing for client bound connection.
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 02, 2008 4:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The way he knows is Reason Code 2058!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Apr 02, 2008 5:02 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
niraj.chaudhary wrote: |
Hi mvic,
How do you know that your program is using server-bound connection or client bound one? Will there be any change in .bindings file, if it is used for client bound compared to the one which was used for server bound connection?
I have not explicitly set any thing for client bound connection.
Thanks |
When you define TCF or QCF you specify TRANSPORT parameter.
It defines connection type.
If you set it to CLIENT you have to specify QMANAGER, HOSTNAME,
PORT and CHANNEL also. _________________ Marcin |
|
Back to top |
|
 |
niraj.chaudhary |
Posted: Wed Apr 02, 2008 5:39 am Post subject: |
|
|
Novice
Joined: 20 Jun 2007 Posts: 22 Location: UK
|
thanks marcin!
I guess, i need to modify the the bindings file that I am using now. The binding file I am using right now does not have any ip, port or channel mentioned in it.
NC |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 02, 2008 5:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
marcin.kasinski wrote: |
If you set it to CLIENT you have to specify HOSTNAME,
PORT and CHANNEL also. |
Not QUEUEMANAGER. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Apr 02, 2008 6:08 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
jefflowrey wrote: |
marcin.kasinski wrote: |
If you set it to CLIENT you have to specify HOSTNAME,
PORT and CHANNEL also. |
Not QUEUEMANAGER. |
No.
It is QMANAGER or QMGR.
I havent checked with QUEUEMANAGER, but QMANAGER and QMGR works fine. _________________ Marcin |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 02, 2008 6:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
marcin.kasinski wrote: |
jefflowrey wrote: |
marcin.kasinski wrote: |
If you set it to CLIENT you have to specify HOSTNAME,
PORT and CHANNEL also. |
Not QUEUEMANAGER. |
No.
It is QMANAGER or QMGR.
I havent checked with QUEUEMANAGER, but QMANAGER and QMGR works fine. |
Sorry - this is not what I meant.
It's only useful to specify a queue manager name in a client connection when you are using a client connection table.
It is redundant and can otherwise cause problems if you are using hostname/port/channel. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Apr 02, 2008 6:27 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
jefflowrey wrote: |
Sorry - this is not what I meant.
It's only useful to specify a queue manager name in a client connection when you are using a client connection table.
It is redundant and can otherwise cause problems if you are using hostname/port/channel. |
OK. I see. _________________ Marcin |
|
Back to top |
|
 |
|