ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » amqsput and amqsget successful, JMS unable to connect

Post new topic  Reply to topic
 amqsput and amqsget successful, JMS unable to connect « View previous topic :: View next topic » 
Author Message
niraj.chaudhary
PostPosted: Wed Apr 02, 2008 2:54 am    Post subject: amqsput and amqsget successful, JMS unable to connect Reply with quote

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
View user's profile Send private message Yahoo Messenger
mvic
PostPosted: Wed Apr 02, 2008 3:11 am    Post subject: Re: amqsput and amqsget successful, JMS unable to connect Reply with quote

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
View user's profile Send private message
niraj.chaudhary
PostPosted: Wed Apr 02, 2008 4:36 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Wed Apr 02, 2008 4:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
marcin.kasinski
PostPosted: Wed Apr 02, 2008 5:02 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
niraj.chaudhary
PostPosted: Wed Apr 02, 2008 5:39 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Wed Apr 02, 2008 5:41 am    Post subject: Reply with quote

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
View user's profile Send private message
marcin.kasinski
PostPosted: Wed Apr 02, 2008 6:08 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Wed Apr 02, 2008 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message
marcin.kasinski
PostPosted: Wed Apr 02, 2008 6:27 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » amqsput and amqsget successful, JMS unable to connect
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.