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 » Error while connecting to Websphere MQ from Java client

Post new topic  Reply to topic
 Error while connecting to Websphere MQ from Java client « View previous topic :: View next topic » 
Author Message
ashishghir
PostPosted: Mon Feb 20, 2012 1:31 am    Post subject: Error while connecting to Websphere MQ from Java client Reply with quote

Newbie

Joined: 20 Feb 2012
Posts: 1

HI,

I am trying to connect Websphere MQ via standalone java client in below mentioned way.

Code:
MQQueueConnectionFactory connectionFactory = new MQQueueConnectionFactory();
connectionFactory.setHostName(x.x.x.x);
connectionFactory.setPort(1415);
connectionFactory.setQueueManager("XYZ");
connectionFactory.setChannel("testChannel");
connectionFactory.setTransportType(WMQConstants.WMQ_CM_CLIENT);
connection = (MQQueueConnection)connectionFactory.createConnection(); ##1


However I am getting the following error while connecting to WebSphere MQ on line ##1

Code:
JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager 'XYZ' with connection mode 'Client' and host name 'x.x.x.x(1415)'.
Please check if the supplied username and password are correct on the QueueManager to which you are connecting.
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').


I checked various forums but did not find any concrete answer for what needs to be done regarding this. Also didnt find any provision for setting the user name and password for the QueueManager.

Please let me know if anyone has encountered this issue before or has any idea regarding this.

It would be great if elaborated steps are mentioned for resolving this issue since I am beginner to Websphere MQ.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 20, 2012 4:14 am    Post subject: Reply with quote

Grand High Poobah

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

As a newbie to the forum, please do not disable the BBcode and use code tags... I put them in for you this time....

Now to your question:
Seeing that you use JMS standalone you need to use the following form:

Code:
Connection myconn = cf.createConnection(username, "");

I did not specify a passwd because it does not get checked...

If you are not running on V7.1 you should not change the code, but secure all svrconn channels with SSL and set an mcauser on each of them.

Have fun
_________________
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 » Error while connecting to Websphere MQ from Java client
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.