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 » Tomcat 5.5, IBM MQ 7.0, Java JMS

Post new topic  Reply to topic
 Tomcat 5.5, IBM MQ 7.0, Java JMS « View previous topic :: View next topic » 
Author Message
mqmayhem
PostPosted: Thu Apr 22, 2010 1:08 pm    Post subject: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Newbie

Joined: 22 Apr 2010
Posts: 7

Hi I am trying to put message in queue using JMS from Tomcat 5.5 but facing the following error message.

Error Code::JMSWMQ0018
Back to top
View user's profile Send private message
mqmayhem
PostPosted: Thu Apr 22, 2010 1:25 pm    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Newbie

Joined: 22 Apr 2010
Posts: 7

mqmayhem wrote:
Hi I am trying to put message in queue using JMS from Tomcat 5.5 but facing the following error message.

Error Code::JMSWMQ0018

Code:

Message::JMSWMQ0018: Failed to connect to queue manager 'CHRI.DEV.QM' with connection mode 'Client' and host name '10.30.239.123'.
ERROR Error Code::JMSWMQ0018
ERROR  Linked Exception Message::JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').
com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').
        at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:206)
        at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:410)
        at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:7855)
        at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7331)
        at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:276)
        at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6055)
        at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:115)
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 22, 2010 1:29 pm    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqmayhem wrote:
ERROR Linked Exception Message::JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').


It's probably the most common code in WMQ, can result from many possible problems (not all of them WMQ related) and has been the subject of much discussion here.

The search facility will turn up a lot of useful information for your troubleshooting.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqmayhem
PostPosted: Fri Apr 23, 2010 6:49 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Newbie

Joined: 22 Apr 2010
Posts: 7

Vitor wrote:
mqmayhem wrote:
ERROR Linked Exception Message::JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').


It's probably the most common code in WMQ, can result from many possible problems (not all of them WMQ related) and has been the subject of much discussion here.

The search facility will turn up a lot of useful information for your troubleshooting.


Thanks Vitor for the response.Can you please point me to the related thread if possible?
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 23, 2010 6:56 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqmayhem wrote:
Thanks Vitor for the response.Can you please point me to the related thread if possible?


Not thread but threads - I wasn't using hyperbole. The 2059 is a very common code with many, many reasons and has been the subject of many, many discussions.

You'll find the search top right.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqmayhem
PostPosted: Fri Apr 23, 2010 7:23 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Newbie

Joined: 22 Apr 2010
Posts: 7

Vitor wrote:
mqmayhem wrote:
Thanks Vitor for the response.Can you please point me to the related thread if possible?


Not thread but threads - I wasn't using hyperbole. The 2059 is a very common code with many, many reasons and has been the subject of many, many discussions.

You'll find the search top right.


I have tried the search option victor but could not find close to my requirement.

Environment: IBM MQ 7.0 installed in Unix system.Tomcat 5.5 installed in Windows and no MQ Client in Windows.

Trying to connect to MQ and put message using JMS.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 23, 2010 7:41 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqmayhem wrote:
I have tried the search option victor but could not find close to my requirement.


2059 is the only requirement. It doesn't matter what else is installed - except:

mqmayhem wrote:
Environment: IBM MQ 7.0 installed in Unix system.Tomcat 5.5 installed in Windows and no MQ Client in Windows.


If you've got no WMQ component on Windows, where is the 2059 being generated from, given that it's a specific WMQ code? Have you just copied the jar files you think are right into Tomcat? If so, you've probably missed the rest of the WMQ client configuration steps as well and hence are getting a 2059.

Read up on 2059 errors and follow the steps. You might also find some of the discussions on if the WMQ Client is necessary for Java interesting.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqmayhem
PostPosted: Fri Apr 23, 2010 7:52 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Newbie

Joined: 22 Apr 2010
Posts: 7

Vitor wrote:
mqmayhem wrote:
I have tried the search option victor but could not find close to my requirement.


2059 is the only requirement. It doesn't matter what else is installed - except:

mqmayhem wrote:
Environment: IBM MQ 7.0 installed in Unix system.Tomcat 5.5 installed in Windows and no MQ Client in Windows.


If you've got no WMQ component on Windows, where is the 2059 being generated from, given that it's a specific WMQ code? Have you just copied the jar files you think are right into Tomcat? If so, you've probably missed the rest of the WMQ client configuration steps as well and hence are getting a 2059.

Yes am getting the error in Tomcat when i am trying to get Queue Connection.

Context context = (Context) new InitialContext().lookup("java:comp/env");
QueueConnectionFactory qcf = (QueueConnectionFactory) context.lookup("jms/MyQCF");

configuration in Context.xml

<Context antiJARLocking="true" path="/v1">
<Resource
name="jms/MyQCF"
auth="Container"
type="com.ibm.mq.jms.MQQueueConnectionFactory"
factory="com.ibm.mq.jms.MQQueueConnectionFactoryFactory"
description="JMS Queue Connection Factory for sending messages"
HOST="<hostname>"
PORT="<port no>"
CHAN="<channel name>"
TRAN="1"
QMGR="<queue mgr name>"/>
<Resource
name="jms/MyQ"
auth="Container"
type="com.ibm.mq.jms.MQQueue"
factory="com.ibm.mq.jms.MQQueueFactory"
description="JMS Queue for receiving messages from Dialog"
QU="<queue name>"/>
</Context>

in web.xml

<resource-env-ref>
<resource-env-ref-name>jms/MyQCF</resource-env-ref-name>
<resource-env-ref-type>javax.jms.QueueConnectionFactory</resource-env-ref-type>
</resource-env-ref>

<resource-env-ref>
<resource-env-ref-name>jms/MyQ</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>

jar files

com.ibm.mq.jar
com.ibm.mq.jmqi.jar
com.ibm.mqjms.jar
connector.jar
dhbcore.jar
geronimo-j2ee-management_1.0_spec-1.0.jar
geronimo-jms_1.1_spec-1.0.jar


Read up on 2059 errors and follow the steps. You might also find some of the discussions on if the WMQ Client is necessary for Java interesting.


Am trying to connect to MQ through JMS deployed in Tomcat in client mode which does not require MQ client installed in Tomcat server.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 23, 2010 8:45 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqmayhem wrote:
Am trying to connect to MQ through JMS deployed in Tomcat in client mode which does not require MQ client installed in Tomcat server.


Well that's something I didn't know.

I bet you still have to perform the client configuration steps though. Try configuring the client connection as per the manual and see if that fixes your 2059.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqmayhem
PostPosted: Fri Apr 23, 2010 9:03 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Newbie

Joined: 22 Apr 2010
Posts: 7

Vitor wrote:
mqmayhem wrote:
Am trying to connect to MQ through JMS deployed in Tomcat in client mode which does not require MQ client installed in Tomcat server.


Well that's something I didn't know.

I bet you still have to perform the client configuration steps though. Try configuring the client connection as per the manual and see if that fixes your 2059.


Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2059;AMQ9547: Type of remote channel not suitable for action requested. [3=<CHNL>]
Back to top
View user's profile Send private message
mqmayhem
PostPosted: Fri Apr 23, 2010 9:07 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Newbie

Joined: 22 Apr 2010
Posts: 7

Vitor wrote:
mqmayhem wrote:
Am trying to connect to MQ through JMS deployed in Tomcat in client mode which does not require MQ client installed in Tomcat server.


Well that's something I didn't know.

I bet you still have to perform the client configuration steps though. Try configuring the client connection as per the manual and see if that fixes your 2059.


Which Manual Vitor?
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 23, 2010 9:12 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqmayhem wrote:
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2059;AMQ9547: Type of remote channel not suitable for action requested. [3=<CHNL>]


As 2059 errors go, that's fairly descriptive. And would have shortened this thread if you'd posted it in the 1st place.

Also proves it's not an error your end, but at the Unix end. Speak to whoever runs your queue manager.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 23, 2010 9:13 am    Post subject: Re: Tomcat 5.5, IBM MQ 7.0, Java JMS Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqmayhem wrote:
Which Manual Vitor?


Oddly enough the installation, configuration and use of clients in WMQ is covered in the WMQ Clients manual.

To preempt your next question, the link's at the top of this page
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Tomcat 5.5, IBM MQ 7.0, Java JMS
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.