Author |
Message
|
mqsnbmp1 |
Posted: Wed Mar 01, 2006 8:23 am Post subject: 5.3 client JAR's with WMQ 6.0 |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
Is there any problem in using 5.3 client JAR's for a JMS program to work with queues administered by WMQ 6.0? -- Thanks. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Mar 01, 2006 8:31 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
That should work, provided you're (reasonibly) up to date on v5.3 service .... why not just use the v6 jars? _________________ -wayne |
|
Back to top |
|
 |
vennela |
Posted: Wed Mar 01, 2006 9:21 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
You mean you used JMSAdmin using v6 jars and want to look them up using 5.3 jars ? |
|
Back to top |
|
 |
mqsnbmp1 |
Posted: Wed Mar 01, 2006 12:11 pm Post subject: |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
We have different queues controlled by different WMQ versions (5.3 and 6.0), and the same program needs to access them all. So I thought the lowest common denominator would be 5.3 JARs (only JMS API). |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 01, 2006 12:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqsnbmp1 wrote: |
We have different queues controlled by different WMQ versions (5.3 and 6.0), and the same program needs to access them all. So I thought the lowest common denominator would be 5.3 JARs (only JMS API). |
I use v6.0 refresh pack 1 jars as client for both 5.3 and 6.0 and they work fine. However you better have your 5.3 at CSD 11 or above (known JMS problems on CSD 08/09). _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqsnbmp1 |
Posted: Sun Mar 05, 2006 6:26 am Post subject: |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
I've looked at WebSphere MQ Client download page (for Windows platform) and found two relevant links: WMQ Client v5.3 (Feb'06) and WMQ Client RefreshPacs v6.0 (Dec'05). So does this mean I first download Client v5.3 and then apply v6.0 update? Again, all this is in the context of obtaining client-side JAR's for standalone Java programs that use JMS API only. |
|
Back to top |
|
 |
wschutz |
Posted: Sun Mar 05, 2006 6:31 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
No, you'd download either the V5.3 or V6 client, you don't need both.... _________________ -wayne |
|
Back to top |
|
 |
mqsnbmp1 |
Posted: Mon Mar 06, 2006 8:59 am Post subject: |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
I just downloaded WMQ Client SupportPacs 6.0.1.0 (Dec 8, 2005). And right out of the box I'm getting "java.lang.ClassNotFoundException: com.ibm.mq.jms.context.WMQInitialContextFactory".
So I started looking around to see the difference between 5.3 client and 6.0 client /Java/lib contents and found that mqcontext.jar is missing in 6.0 version (where initial context factory is located). Do I need to apply some other updates on top of 6.0 client to get JNDI work? -- Thanks. |
|
Back to top |
|
 |
wschutz |
Posted: Mon Mar 06, 2006 9:58 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I *think* mqcontext.jar comes from the ME01 supportpac:ME01: WebSphere MQ - Initial Context Factory. My vanilla v5.3 install doesn't have an mqcontext.jar file..... _________________ -wayne |
|
Back to top |
|
 |
mqsnbmp1 |
Posted: Mon Mar 06, 2006 12:33 pm Post subject: |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
OK, so I installed ME01 and MS0B. It still doesn't work due to " javax.naming.NamingException: Unable to connect to the admin queue. Exception was: javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager". I saw earlier threads on the difference in V5.3 and V6 authentication, but the issue is specifically in V6 client libraries.
I have a very simple code that runs against V5.3 WMQ server, and there are no problems when I switch to 5.3 libraries. Here is the snippet that fails with 6.0 client JAR's (against the same v5.3 WMQ server):
InitialContext ctx = new InitialContext(appProperties);
where appProperties is loaded from a file that has these 2 lines:
java.naming.factory.initial = com.ibm.mq.jms.context.WMQInitialContextFactory
java.naming.provider.url = <servername>:1414/SYSTEM.DEF.SVRCONN
The queues on remote server do not require authentication.
Does this mean that 6.0 client code also requires java.naming.security.principal/credetnials properties set? From what JNDI manuals say, they should not be provided if no authentication is required. If 6.0 requires them, what values should they be set to in case no authentication is required? Is this a bug or a "feature"? Any clarification on what to do would be really appreciated
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Mar 06, 2006 8:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well all depends on how you are connecting:
Code: |
qcf.createConnection(); // or
qcf.createConnection(userid,passwd); |
I am assuming that we are talking about a client connection.
You should probably still use the overloaded method even if your arguments may be "","".
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqsnbmp1 |
Posted: Tue Mar 07, 2006 3:20 am Post subject: |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
The exception takes place well before the connection is established (even before QCF is obtained). Again, snippet from above:
InitialContext ctx = new InitialContext(appProperties);
In addition, I saw in previous posts that Windows ID's were put into mqm group and the same ID's reported as security.principal. What if WMQ runs on Windows? I tried to put even MQ Admin user ID as security principal, but still got the same error with V6.0 client JAR's, while 5.3 client JAR's work just fine without any of this stuff.
I looks like V6.0 designers had some thought behind all this, I wish it was clearly documented with instructions on how to act in various scenarios, such as the one I'm having (i.e. migrating from 5.3 to 6.0 client JAR's). |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 07, 2006 2:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
In the properties for the initial context are you passing a security principal? This may be more geared towards ssl and JAAS.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqsnbmp1 |
Posted: Tue Mar 07, 2006 3:08 pm Post subject: |
|
|
Apprentice
Joined: 18 Oct 2005 Posts: 25
|
Witn 5.3 I do not pass principal and credentials. With 6.0 JAR's I tried with and without, and got the same negative result. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 07, 2006 3:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Can you provide the code, the place of the exception and the exception being thrown ?
As well how did you build your initial context ? _________________ MQ & Broker admin |
|
Back to top |
|
 |
|