Author |
Message
|
j2ee |
Posted: Sat Apr 03, 2004 6:36 am Post subject: exception when jms client invoking remote mq server |
|
|
Newbie
Joined: 03 Apr 2004 Posts: 3
|
I used a weblogic server(8.1 sp2) for jndi server of mq server, and defined a GCF and Queue using below scripts in JmsAdmin tool:
DEFINE QCF(bpmQCF) HOST(192.168.0.73) PORT(1414) TRAN(CLIENT)
DEFINE Q(bpmQ) QUEUE(BPMQueue)
END
and I created a foreign jms server in another weblogic server(8.1 sp2), but the 2 weblogic servers were all in one machine(192.168.0.73), but the port number was different.
and I writed a jms client in another machine(192.168.0.1) to send a message to the second weblogic server, but encoutered a exception like below:
javax.jms.JMSException: MQJMS2005: can not create MQQueueManager for '192.168.0.73:JMS'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironm
ent.java:546)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1450)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:960)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:159)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:77)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueue
ConnectionFactory.java:142)
at com.jacky.mdb.MDBClient.<init>(MDBClient.java:44)
at com.jacky.mdb.MDBClient.main(MDBClient.java:77)
There was an exception while creating and using the Trader.
This indicates that there was a problem communicating with the server: javax.jms
.JMSException: MQJMS2005: can not create MQQueueManager for '192.168.0.73:JMS'
Exception in thread "main" javax.jms.JMSException: MQJMS2005: can not create MQQueueManager for '192.168.0.73:JMS'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironm
ent.java:546)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1450)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:960)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:159)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:77)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueue
ConnectionFactory.java:142)
at com.jacky.mdb.MDBClient.<init>(MDBClient.java:44)
at com.jacky.mdb.MDBClient.main(MDBClient.java:77)
Anyone can help me? |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Apr 03, 2004 1:34 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Is there a linked exception? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bower5932 |
Posted: Sat Apr 03, 2004 5:57 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I'd guess that the linked exception will probably be a 2059. You didn't specify a qmgr in your QCF. Do you have a defautl qmgr defined? Also, is your listener running? |
|
Back to top |
|
 |
j2ee |
Posted: Sat Apr 03, 2004 7:57 pm Post subject: |
|
|
Newbie
Joined: 03 Apr 2004 Posts: 3
|
bower5932 wrote: |
I'd guess that the linked exception will probably be a 2059. You didn't specify a qmgr in your QCF. Do you have a defautl qmgr defined? Also, is your listener running? |
I have defined a default QMGR named 'JMS', and listener is running. |
|
Back to top |
|
 |
j2ee |
Posted: Sat Apr 03, 2004 9:34 pm Post subject: |
|
|
Newbie
Joined: 03 Apr 2004 Posts: 3
|
and no other linked exception. |
|
Back to top |
|
 |
gunter |
Posted: Sun Apr 04, 2004 5:43 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
Can you connect with amqsgetc?
If yes, you have a problem with your code and please post it here.
If not, there is a problem with the client connection.
Sorry, but I can't believe, that MQJMS2005 doesn't have a linked exception. _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Apr 05, 2004 5:17 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I have to agree that I can't believe you don't have a linked exception. You can get it by:
Code: |
} catch( JMSException je ) {
System.out.println("JMS Exception: " + je);
// check for a linked exception
Exception le = je.getLinkedException();
if (le != null) {
System.out.println("Linked exception: " + le);
}
} |
However, I'm also sure that it will come back as a 2059 or a 2058. If it is the 2058, you have a problem with your qmgr name. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Apr 05, 2004 11:59 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Besides not defining the Queue Manager, you are also missing the Channel.
Here's a sample of what a QCF should look like:
Code: |
define QCF(My.ABC.QCF)
QMANAGER(QMgrABC)
CLIENTID(abc_app)
TRANSPORT(CLIENT)
HOSTNAME(10.10.10.10)
CHANNEL(Client_TO_ABC.CH01)
PORT(1414)
FAILIFQUIESCE(YES) |
2 items about the abve QCF:
(1) You should always have the FailIfQuiesce flag set Yes.
(2) Since Java applications by default do not set a UserID value, I always mandate that each application's QCF have the ClientID attribute set to a unique value.
Last the thing anyone needs is to have an application connect to a queue manager and be given mqm authority plus have all of their messages marked with the mqm UserID.
Of course, this means that the 'abc_app' UserID will need to be created on the server where the queue manager is running plus you must use setmqaut to set the MQ authority for that UserID.
This may be extra work but well worth it. There is nothing worst than having a wide open queue manager and an application just start getting and putting messages to any queue that it wants to!!!!!!!
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|