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 Connect to Webphere MQ by XMS. Need a help.

Post new topic  Reply to topic
 Unable Connect to Webphere MQ by XMS. Need a help. « View previous topic :: View next topic » 
Author Message
vu.hoang.viet
PostPosted: Sun Jan 24, 2010 8:32 pm    Post subject: Unable Connect to Webphere MQ by XMS. Need a help. Reply with quote

Newbie

Joined: 24 Jan 2010
Posts: 3

Hi, I meet a problem when trying connect to Webphere MQ by XMS. Following is my code:
try {
cout << "Hello World, XMS" << endl;

ConnectionFactory connFact;
connFact.setIntProperty(XMSC_CONNECTION_TYPE, XMSC_CT_WMQ);
connFact.setIntProperty(XMSC_WMQ_CONNECTION_MODE, XMSC_WMQ_CM_CLIENT);
connFact.setStringProperty(XMSC_WMQ_HOST_NAME, "192.168.1.33");
connFact.setIntProperty(XMSC_WMQ_PORT, 1416);
connFact.setStringProperty(XMSC_WMQ_QUEUE_MANAGER, "DemoQM");
connFact.setStringProperty(XMSC_WMQ_CHANNEL, "DemoChannel");

cout << "Connecting..." << endl;
Connection conn = connFact.createConnection();
cout << "Connected" << endl;
conn.close();
} catch (Exception& exp) {
cout << "Exp " << exp.getErrorString().c_str() << endl;
cout << "JMS Exp " << exp.getJMSExceptionString().c_str() << endl;
cout << "Link Exp : " << exp.getLinkedException()->getErrorString().c_str() << endl;
}

And I got Exception:

Hello World, XMS
Connecting...
Exp XMS_E_CONNECT_FAILED
JMS Exp XMS_X_GENERAL_EXCEPTION
Link Exp : XMS_E_NONE

Anyone help me pls
Back to top
View user's profile Send private message
vu.hoang.viet
PostPosted: Sun Jan 24, 2010 8:39 pm    Post subject: I did in Java Reply with quote

Newbie

Joined: 24 Jan 2010
Posts: 3

I did by Java, It's Ok. My code:

MQQueueConnectionFactory cf = new MQQueueConnectionFactory();



try {

cf.setHostName("192.168.1.33");

cf.setPort(1416);

cf.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);

cf.setQueueManager("DemoQM");

cf.setChannel("DemoChannel");



MQConnection conn = (MQConnection) cf.createConnection("", "");



System.out.println("Connected");

conn.close();

} catch (JMSException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jan 24, 2010 8:53 pm    Post subject: Reply with quote

Grand High Poobah

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

Could be a security issue / user id thing. Set an mcauser on the channel and try again...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
vu.hoang.viet
PostPosted: Tue Jan 26, 2010 12:07 am    Post subject: Reply with quote

Newbie

Joined: 24 Jan 2010
Posts: 3

Hi, I tried to change MCA userid by WMQ Explorer but I cant find where I can set password
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 26, 2010 5:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

vu.hoang.viet wrote:
Hi, I tried to change MCA userid by WMQ Explorer but I cant find where I can set password


There isn't one.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 26, 2010 6:18 pm    Post subject: Reply with quote

Grand High Poobah

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

If you are connecting to a V6 qmgr from a V7 client you also might want to have a look
at this post: http://www.mqseries.net/phpBB2/viewtopic.php?t=52057
_________________
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 Connect to Webphere MQ by XMS. Need a help.
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.