Author |
Message
|
Suja |
Posted: Wed Nov 15, 2006 8:35 pm Post subject: com.ibm.mq.MQException: MQJE001 |
|
|
Novice
Joined: 07 Nov 2006 Posts: 16
|
HI All,
Iam trying to send a msg from client program.iam having both Mq server and client in the same machine.
I am having Channels as follow:
Code: |
AMQ8414: Display Channel details.
CHANNEL(CHAN1) CHLTYPE(SVRCONN)
ALTDATE(2006-11-15) ALTTIME(11.30.24)
COMPHDR(NONE) COMPMSG(NONE)
DESCR(Server-connection to Client_1) HBINT(300)
KAINT(AUTO) MAXMSGL(4194304)
MCAUSER( ) MONCHL(QMGR)
RCVDATA( ) RCVEXIT( )
SCYDATA( ) SCYEXIT( )
SENDDATA( ) SENDEXIT( )
SSLCAUTH(REQUIRED) SSLCIPH( )
SSLPEER( ) TRPTYPE(TCP)
AMQ8414: Display Channel details.
CHANNEL(CHAN1) CHLTYPE(CLNTCONN)
ALTDATE(2005-01-01) ALTTIME(02.37.26)
COMPHDR(NONE) COMPMSG(NONE)
CONNAME(192.168.0.2) DESCR(Client-connection to Server)
HBINT(300) KAINT(AUTO)
LOCLADDR( ) MAXMSGL(4194304)
MODENAME( ) PASSWORD( )
QMNAME(QM_B) RCVDATA( )
RCVEXIT( ) SCYDATA( )
SCYEXIT( ) SENDDATA( )
SENDEXIT( ) SSLCIPH( )
SSLPEER( ) TPNAME( )
TRPTYPE(TCP) USERID( ) |
the code which iam trying to run is
Code: |
public class ClientSender {
public static void main(String[] args) {
try {
MQQueueConnectionFactory m_factory = new MQQueueConnectionFactory();
m_factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
m_factory.setHostName("198.168.0.2");
m_factory.setQueueManager("QM_B");
m_factory.setChannel("CHAN1 ");
QueueConnection m_connection = m_factory.createQueueConnection();
QueueSession m_session = m_connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
Queue q= m_session.createQueue("Q1");
QueueSender m_queueSender = m_session.createSender(q);
m_connection.start();
TextMessage tm = m_session.createTextMessage();
tm.setText("TESTING 1 2 3");
m_queueSender.send(tm);
System.out.println("SUCCESS!!");
}
catch(JMSException e){
e.printStackTrace();
System.out.println(e.getLinkedException());
}
}
}
|
the exception iam getting is :
Code: |
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for '198.168.0.2:QM_B'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:586)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2110)
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.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)
at ClientSender.main(ClientSender.java:44)
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused |
i hav already gone thro the previous posts related to the same .But this doest help me to solve my problem.Plz Some one help me to run this successfully. _________________ Suja
Last edited by Suja on Wed Nov 15, 2006 8:51 pm; edited 1 time in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 15, 2006 8:50 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I noticed a discrepancy:
Quote: |
QMNAME(QM2)
vs
m_factory.setQueueManager("QM_B"); |
So which one is it? QM_B or QM2?
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Suja |
Posted: Wed Nov 15, 2006 10:01 pm Post subject: |
|
|
Novice
Joined: 07 Nov 2006 Posts: 16
|
its QMNAME(QM_B) and m_factory.setQueueManager("QM_B"); _________________ Suja |
|
Back to top |
|
 |
wschutz |
Posted: Thu Nov 16, 2006 3:44 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Does it work if you "set MQSERVER=CHAN1/TCP/198.168.0.2" and then use amqsputc: "amqsputc SYSTEM.DEFAULT.LOCAL.QUEUE QM_B".
Also, I would drop the blank after CHAN1 in the setChannel method ....
Also, the clntconn defintion in the channel table isn't being used by the JMS client in your example .... _________________ -wayne |
|
Back to top |
|
 |
vennela |
Posted: Thu Nov 16, 2006 10:15 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Nowhere the port number is mentioned. If it is defaulted to 1414, is the listener running on 1414 |
|
Back to top |
|
 |
Suja |
Posted: Thu Nov 16, 2006 9:09 pm Post subject: |
|
|
Novice
Joined: 07 Nov 2006 Posts: 16
|
vennela wrote: |
Nowhere the port number is mentioned. If it is defaulted to 1414, is the listener running on 1414 |
Thanks A lot. _________________ Suja |
|
Back to top |
|
 |
|