Author |
Message
|
boonus |
Posted: Mon Jun 25, 2007 7:49 am Post subject: Unable Connecting QM J2SE+JMS |
|
|
Newbie
Joined: 27 Sep 2006 Posts: 7
|
Hi,
I am trying to connect to my QueManager from my stand-alone client application, using J2SE+JMS+WSMQ6, and I get this error:
Code:
String CF_CLASS_NAME = "com.ibm.mq.jms.context.WMQInitialContextFactory";
String WMQ_URL = "10.0.0.1:1414/SVRCONN";
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, CF_CLASS_NAME);
props.put(Context.PROVIDER_URL, WMQ_URL);
props.put(Context.SECURITY_AUTHENTICATION, "none");
Context ictx = new InitialContext(props);
Stacktrace:
Exception in thread "main" javax.naming.NamingException: Unable to connect to the admin queue. Exception was: javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager [Root exception is javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager]
at com.ibm.mq.jms.context.MQContext.<init>(MQContext.java:318)
at com.ibm.mq.jms.context.WMQInitialContextFactory.getInitialContext(WMQInitialContextFactory.java:29)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at MQWS.getMessage(MQWS.java:74)
at MQWS.main(MQWS.java:110)
Caused by: javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2050)
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.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:185)
at com.ibm.mq.jms.context.MQContext.<init>(MQContext.java:311)
... 7 more
Connecting to my remote MQ-server works fine with my WSMQ Java API-client-app (com.ibm.mq.jar) and an JMS/WS/AS app, without any extra authentication parameters. Therefore I can't see any 'invalid security authentication' issues from the exception i get above.
Any ideas? Thank you, Magnus |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jun 25, 2007 1:46 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Extract the linked exception from the JMS exception and post it...
Anyways it is much easier to start with the file context (sun) ... and this (file context) does not require a fix pack...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
boonus |
Posted: Wed Jun 27, 2007 1:18 am Post subject: |
|
|
Newbie
Joined: 27 Sep 2006 Posts: 7
|
Thanx for the hint!
Setting Context.SECURITY_PRINCIPAL = "" did the trick..
/Magnus |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 27, 2007 1:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
magnus wrote: |
Thanx for the hint!
Setting Context.SECURITY_PRINCIPAL = "" did the trick..
/Magnus |
Sure but do you realize what this means??
Is this a client connection??  _________________ MQ & Broker admin |
|
Back to top |
|
 |
boonus |
Posted: Wed Jun 27, 2007 3:04 am Post subject: |
|
|
Newbie
Joined: 27 Sep 2006 Posts: 7
|
Not sure really, but i found some property-setting from the linked exception that said userID=(my local user on client). Why this is not blank seems strange cause I doesn't add any authorization parameters to the QM-connection.
I am looking for a anonymous client connection to start with..
/Magnus |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 27, 2007 1:11 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
magnus wrote: |
Not sure really, but i found some property-setting from the linked exception that said userID=(my local user on client). Why this is not blank seems strange cause I doesn't add any authorization parameters to the QM-connection.
I am looking for a anonymous client connection to start with..
/Magnus |
Beware... JMS clients in V5.3 and V6 behave a little bit differently in this regard... _________________ MQ & Broker admin |
|
Back to top |
|
 |
|