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 » java.lang.NoClassDefFoundError: javax/transaction/xa/XAExcep

Post new topic  Reply to topic
 java.lang.NoClassDefFoundError: javax/transaction/xa/XAExcep « View previous topic :: View next topic » 
Author Message
kirani
PostPosted: Tue Jun 11, 2002 8:38 am    Post subject: java.lang.NoClassDefFoundError: javax/transaction/xa/XAExcep Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Folks,

I have installed SupportPac MA88 on my machine.
Environment:
OS : Windows 2000
MQSeries : 5.2 (CSD4)
Java: 1.3.1_03

Following files are included in my CLASSPATH

C:\Program Files\IBM\MQSeries\Java\lib\com.ibm.mq.jar;
C:\Program Files\IBM\MQSeries\Java\lib\com.ibm.mqjms.jar;
C:\Program Files\IBM\MQSeries\Java\lib\jms.jar;
C:\Program Files\IBM\MQSeries\Java\lib\jndi.jar;
C:\Program Files\IBM\MQSeries\Java\lib\;


I have a very simple program (Java Application), which is making a server connection to local queue manager. If I don't set MQEnvironment in my code, I get following error:

Code:

C:\java>java TestQ
Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/xa/XAException
        at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:67)
        at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:241)
        at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:148)
        at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:136)
        at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:154)
        at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
        at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:150)
        at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:649)
        at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:598)
        at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:375)
        at TestQ.<init>(TestQ.java:22)
        at TestQ.main(TestQ.java:12)


If I add following lines in my source, everything works fine.
Code:

   MQEnvironment.hostname="MyHostName";
   MQEnvironment.port=1414;
   MQEnvironment.channel = "SYSTEM.DEF.SVRCONN";


Any idea?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
StefanSievert
PostPosted: Tue Jun 11, 2002 9:32 am    Post subject: Reply with quote

Partisan

Joined: 28 Oct 2001
Posts: 333
Location: San Francisco

Don't bet on my answer, but I think you are missing out on the jta.jar file that contains all the XA classes.
Maybe worth a try...
XA transactions are not supported when acting as an MQ client, that's probably the reason why you don't see the error when setting the MQEnvironment properties.
Stefan
_________________
Stefan Sievert
IBM Certified * WebSphere MQ
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Jun 11, 2002 9:53 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Thanks Stefan!
This solved the problem!
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » java.lang.NoClassDefFoundError: javax/transaction/xa/XAExcep
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.