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 » XAQueueSession creation problem

Post new topic  Reply to topic
 XAQueueSession creation problem « View previous topic :: View next topic » 
Author Message
Andrey
PostPosted: Mon Jul 22, 2002 11:57 pm    Post subject: XAQueueSession creation problem Reply with quote

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
View user's profile Send private message Send e-mail
amigupta1978
PostPosted: Tue Jul 23, 2002 8:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
Andrey
PostPosted: Wed Jul 24, 2002 1:25 am    Post subject: Almost is OK, BUT.... Reply with quote

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
View user's profile Send private message Send e-mail
bower5932
PostPosted: Wed Jul 24, 2002 8:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Andrey
PostPosted: Thu Jul 25, 2002 3:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
bower5932
PostPosted: Thu Jul 25, 2002 6:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » XAQueueSession creation problem
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.