|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XAQueueSession creation problem |
« View previous topic :: View next topic » |
Author |
Message
|
Andrey |
Posted: Mon Jul 22, 2002 11:57 pm Post subject: XAQueueSession creation problem |
|
|
Apprentice
Joined: 02 Sep 2001 Posts: 37 Location: Belarus, Minsk
|
Does anybody can explain, why the following exception can be thrown?
This exception is thrown when i'm trying to create XAQueueSession.
In the code below i've pointed the place where exception is thrown:
Code: |
com.ibm.mq.jms.MQXAQueueConnectionFactory connFactory =
new com.ibm.mq.jms.MQXAQueueConnectionFactory();
connFactory.setCCSID(1252);
connFactory.setChannel("SYSTEM.DEF.SVRCONN");
connFactory.setHostName("192.168.190.37");
connFactory.setPort(1414);
connFactory.setQueueManager("QM1");
connFactory.setTransportType(1);
xaQueueConnection = connFactory.createXAQueueConnection();
xaQueueConnection.start();
here-> xaSession = xaQueueConnection.createXAQueueSession();
|
This is exception trace:
Code: |
java.lang.ClassCastException
java.lang.Throwable()
java.lang.Exception()
java.lang.RuntimeException()
java.lang.ClassCastException()
com.ibm.mq.MQXAResource com.ibm.mq.MQXAQueueManager.getXAResource()
com.ibm.mq.MQXAResource com.ibm.mq.MQXAQueueManager.getXAResource()
javax.jms.XAQueueSession com.ibm.mq.jms.MQXAQueueConnection.createXAQueueSession()
javax.jms.XAQueueSession com.ibm.jms.mq.transaction.test.TransactionTest.createJMSXASession()
void com.ibm.jms.mq.transaction.test.TransactionTest.run() |
Thanks in advance |
|
Back to top |
|
 |
amigupta1978 |
Posted: Tue Jul 23, 2002 8:49 pm Post subject: |
|
|
Centurion
Joined: 22 Jan 2002 Posts: 132 Location: India
|
HI,
U cant create the XA session when u r in client binding mode. XA session is only valid in the MQ_Binding mode.
(MQbinding take place when u run ur program on the same machine where ur MQserver is and u dont specify any hostname,channel and port)
Regards,
Amit |
|
Back to top |
|
 |
Andrey |
Posted: Wed Jul 24, 2002 1:25 am Post subject: Almost is OK, BUT.... |
|
|
Apprentice
Joined: 02 Sep 2001 Posts: 37 Location: Belarus, Minsk
|
Hi, thank you very much. Now XASession creating is OK. But now, when i'm trying to swnd message from the XASession the following exception thrown:
Code: |
javax.jms.JMSException: MQJMS2007: failed to send message to MQ queue
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.jms.JMSException(java.lang.String, java.lang.String)
javax.jms.JMSException com.ibm.mq.jms.services.ConfigEnvironment.newException(java.lang.String)
void com.ibm.mq.jms.MQQueueSender.sendInternal(com.ibm.mq.jms.MQQueue, com.ibm.mq.MQQueue, javax.jms.Message, int, int, long)
void com.ibm.mq.jms.MQQueueSender.send(javax.jms.Message, int, int, long)
void com.ibm.mq.jms.MQQueueSender.send(javax.jms.Message)
void com.ibm.jms.mq.transaction.test.TransactionTest.run() |
But when i'm using usial QueueSession with the same parameters all is fine. Could u suggest anything?
Thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Jul 24, 2002 8:36 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Get the linked exception:
Code: |
} catch( JMSException je ) {
/*******************************************/
/* Catch and display exception information */
/*******************************************/
System.out.println("JMSException: " + je);
Exception le = je.getLinkedException();
if (le != null) System.out.println("Linked exception: " + le);
}
|
The actual MQSeries return code will shed more light than the MQJMS message. |
|
Back to top |
|
 |
Andrey |
Posted: Thu Jul 25, 2002 3:56 am Post subject: |
|
|
Apprentice
Joined: 02 Sep 2001 Posts: 37 Location: Belarus, Minsk
|
Thank you,
I see that MQ response code is 2072 and this means MQRC_SYNCPOINT_NOT_AVAILABLE. Also i'm using external unit-of-work coordinator (DB2). Can you expalin why it's heppened?
Thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Jul 25, 2002 6:56 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Did you do all of the necessary steps to let MQSeries know that DB2 would be participating in the UOW? There are details in the Using Java manual. Basically, you will need to:
Create a database and issue - db2 update dbm cfg using TP_MON_NAME mqmax
Add a resource section to the queue manager (this can be done with the explorer)
If you get a 805 error, issue db2 bind @d2cli.lst blocking all grant public
I'd check out the manual because it gives the details. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|