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 » com.ibm.mq.MQException: MQJE001

Post new topic  Reply to topic
 com.ibm.mq.MQException: MQJE001 « View previous topic :: View next topic » 
Author Message
Suja
PostPosted: Wed Nov 15, 2006 8:35 pm    Post subject: com.ibm.mq.MQException: MQJE001 Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 15, 2006 8:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Suja
PostPosted: Wed Nov 15, 2006 10:01 pm    Post subject: Reply with quote

Novice

Joined: 07 Nov 2006
Posts: 16

its QMNAME(QM_B) and m_factory.setQueueManager("QM_B");
_________________
Suja
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Nov 16, 2006 3:44 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
vennela
PostPosted: Thu Nov 16, 2006 10:15 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Suja
PostPosted: Thu Nov 16, 2006 9:09 pm    Post subject: Reply with quote

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

MQSeries.net Forum Index » IBM MQ Java / JMS » com.ibm.mq.MQException: MQJE001
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.