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 » Unable Connecting QM J2SE+JMS

Post new topic  Reply to topic
 Unable Connecting QM J2SE+JMS « View previous topic :: View next topic » 
Author Message
boonus
PostPosted: Mon Jun 25, 2007 7:49 am    Post subject: Unable Connecting QM J2SE+JMS Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 25, 2007 1:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
boonus
PostPosted: Wed Jun 27, 2007 1:18 am    Post subject: Reply with quote

Newbie

Joined: 27 Sep 2006
Posts: 7

Thanx for the hint!

Setting Context.SECURITY_PRINCIPAL = "" did the trick..

/Magnus
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jun 27, 2007 1:53 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
boonus
PostPosted: Wed Jun 27, 2007 3:04 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Jun 27, 2007 1:11 pm    Post subject: Reply with quote

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

MQSeries.net Forum Index » IBM MQ Java / JMS » Unable Connecting QM J2SE+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.