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 » Exception during the createQueueConnection

Post new topic  Reply to topic Goto page Previous  1, 2
 Exception during the createQueueConnection « View previous topic :: View next topic » 
Author Message
creacker
PostPosted: Tue Dec 09, 2008 12:12 pm    Post subject: Reply with quote

Novice

Joined: 02 Dec 2008
Posts: 11

I'm not using an XA connection factory but a MQQueue connection factory.

And I still does not understand why i cannot connect to my local Websphere MQ server 5.3 with my 6.0 jars
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 09, 2008 2:38 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

creacker wrote:
I'm not using an XA connection factory but a MQQueue connection factory.

And I still does not understand why i cannot connect to my local Websphere MQ server 5.3 with my 6.0 jars

Like I said, I would not trust my 6.0 to connect to a 5.3 below CSD11.
Certainly not below CSD6. I believe you're at CSD1....

If you have server and client on the same box your client installation NEEDS to be at the same level as the SERVER installation. (because of transport = bindings). This includes your java client installation. You cannot run different MQ components (server/client) at different levels on the same machine.

Don't even wonder about applying maintenance. Just upgrade the installation to a supported version....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
creacker
PostPosted: Thu Dec 11, 2008 6:07 pm    Post subject: Reply with quote

Novice

Joined: 02 Dec 2008
Posts: 11

First thanks a lot for your help

fjb_saper wrote:

Like I said, I would not trust my 6.0 to connect to a 5.3 below CSD11.
Certainly not below CSD6. I believe you're at CSD1....

Ok, so i updated my server to the latest CSD14
C:\Documents and Settings\user>mqver
Name: WebSphere MQ
Version: 530.14 CSD14
CMVC level: p530-14-L071214
BuildType: IKAP - (Production)

fjb_saper wrote:

If you have server and client on the same box your client installation NEEDS to be at the same level as the SERVER installation. (because of transport = bindings). This includes your java client installation. You cannot run different MQ components (server/client) at different levels on the same machine

I'm not using 2 mq in the same box : My local server is a 5.3 server, and i have a remote server with MQ 6.0 installed. I just change the jars when i have to use one or the other version.


So i've done another test using 6.0 jars (com.ibm.mq.jar, connector.jar, com.ibm.mqjms.jar and dhbcore.jar). I try to connect to my MQ local server 5.3 CSD 14 with the following code
Code:

MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
try {
   factory.setQueueManager("QMGR");
   factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
   connection = factory.createQueueConnection();
}


but still having a problem
Quote:

com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2046
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:219)
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(MQSimpleConnectionManager.java:168)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:772)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:697)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:657)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:153)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:526)
at com.ibm.mq.MQSPIQueueManager.<init>(MQSPIQueueManager.java:69)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2035)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1532)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:150)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:60)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:171)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)

This problem does not appear if i use 5.3 jars... but I don't want to change jars depending of the MQ version i have to connect to !

Any solution ?

Thank you
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 11, 2008 8:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
So i've done another test using 6.0 jars (com.ibm.mq.jar, connector.jar, com.ibm.mqjms.jar and dhbcore.jar). I try to connect to my MQ local server 5.3 CSD 14 with the following code
Code:

MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
try {
factory.setQueueManager("QMGR");
factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
connection = factory.createQueueConnection();
}


So which part of "You cannot run different MQ components (server/client) at different levels on the same machine" did you not understand?

with a JMSC.MQJMS_TP_BINDINGS_MQ transport you are indicating that you do a "bindings" connection to the server residing on the same box.
Now if that server is 5.3 CSD14 you are SOL. BECAUSE once more You cannot run different MQ components (server/client) at different levels on the same machine

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
creacker
PostPosted: Fri Dec 12, 2008 8:30 am    Post subject: Reply with quote

Novice

Joined: 02 Dec 2008
Posts: 11

Ok, I'm sorry. I'm not fluent in english and i use a dictionnary to translate in english, so sorry if sometimes i misunderstand you.
I was thinking that you were telling me that i can't install 2 MQ series server in the same box.

PeterPtkay told me that there was backward compatibility, so i was thinking that i can use different library in the same machine
PeterPotkay wrote:
There is compatability between those versions of MQ. If your problem went away when you changed versions that's purely coincidental and not the root cause for a 2046 MQ Reason Code.

but it should be for remote connection only....

I'm surprise with that
fjb_saper wrote:
You cannot run different MQ components (server/client) at different levels on the same machine

Because if I use the native library com.ibm.mq.jar and connector.jar with this code
Code:

MQEnvironment.channel = null;
MQEnvironment.hostname = null;
MQEnvironment.port = null;
MQQueueManager QManag = new MQQueueManager("QMGR");

i don't have any error and i can use jar 5.3 or 6.0 in the same box to connect to a local 5.3 MQ series server

So it is forbidden to use JMS library to connect to local mq series 5.3 with Jar 6.0 ?


Last edited by creacker on Fri Dec 12, 2008 11:08 am; edited 1 time in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 12, 2008 10:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Connecting to a local qmgr in bindings mode using java or JMS involves more than just jar files. You may notice that you also have runtime libraries (.dll/.so) in the <mqinstall>/java/lib path. These are specific to the server version. This is why you should allways use the same version as the server version when you connect to a server in "bindings" mode.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
creacker
PostPosted: Fri Dec 12, 2008 11:07 am    Post subject: Reply with quote

Novice

Joined: 02 Dec 2008
Posts: 11

fjb_saper wrote:
Connecting to a local qmgr in bindings mode using java or JMS involves more than just jar files. You may notice that you also have runtime libraries (.dll/.so) in the <mqinstall>/java/lib path. These are specific to the server version. This is why you should allways use the same version as the server version when you connect to a server in "bindings" mode.

Ok, i just feel strange that using object MQQueueManager it works and does not work using MQQueueConnectionFactory.createQueueConnection(), as they will ask the same dll ....

So if i want that my application can either connect to a local server and remote server:
- I will have to provide jars when user want to connect to a remote server
- Or add the <mqinstall>/java/lib path to the classpath for a local connection

Thank you for your help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » Exception during the createQueueConnection
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.