Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/server/MQSESSION

A

Andy Howells

Can anybody help me on this? I am getting the below error but have not
got a clue why. The file in my classpath eing used has the class that
it says is not defined. Any ideas? I am running java version 1.4.0 and
WMQ Series version 5.3 with CSD04.

Exception in thread "main" java.lang.NoClassDefFoundError:
com/ibm/mq/server/MQSESSION
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._createManagedConnec
tion(MQBindingsManagedConnectionFactoryJ11.java:136)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnect
ion(MQBindingsManagedConnectionFactoryJ11.java:154)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.jav
a:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConne
ctionManager.java:150)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.jav
a:649)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:598)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:375)

Thanks to anybody who can help.
Andy
 
S

Sudsy

Andy said:
Can anybody help me on this? I am getting the below error but have not
got a clue why. The file in my classpath eing used has the class that
it says is not defined. Any ideas? I am running java version 1.4.0 and
WMQ Series version 5.3 with CSD04.

Exception in thread "main" java.lang.NoClassDefFoundError:
com/ibm/mq/server/MQSESSION
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:67)

So it looks like it's finding the com.ibm.mq package but not the
com.ibm.mq.server package. I wouldn't be suprised if that package
was in a separate jar since it's common practice to separate the
client and servers sides (smaller files for the client).
If you're running *nix then you can go to the directory where all
the IBM MQ-Series jars are installed and grep for the class you
need, e.g.:
grep com/ibm/mq/server/MQSESSION *.jar

You should get something like this on a hit:
Binary file MQServer.jar matches
 
A

Andy Howells

Sudsy said:
So it looks like it's finding the com.ibm.mq package but not the
com.ibm.mq.server package. I wouldn't be suprised if that package
was in a separate jar since it's common practice to separate the
client and servers sides (smaller files for the client).
If you're running *nix then you can go to the directory where all
the IBM MQ-Series jars are installed and grep for the class you
need, e.g.:
grep com/ibm/mq/server/MQSESSION *.jar

You should get something like this on a hit:
Binary file MQServer.jar matches

Thanks for your help on this. The problem was that I was using an
older set of jars. The error message was a boit strange because the
class that it could not find was within the class file that it was
using, however, I have set-up my classpath to look at the latest set
of jars and the issue has now gone away. It must be something to do
with the MQ dll being comiled against a different set of jars to that
which are being used at runtime. Anyway - issue resolve!
 
H

hiwa

Can anybody help me on this? I am getting the below error but have not
got a clue why. The file in my classpath eing used has the class that
it says is not defined. Any ideas? I am running java version 1.4.0 and
WMQ Series version 5.3 with CSD04.

Exception in thread "main" java.lang.NoClassDefFoundError:
com/ibm/mq/server/MQSESSION
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._createManagedConnec
tion(MQBindingsManagedConnectionFactoryJ11.java:136)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnect
ion(MQBindingsManagedConnectionFactoryJ11.java:154)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.jav
a:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConne
ctionManager.java:150)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.jav
a:649)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:598)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:375)

Thanks to anybody who can help.
Andy
Classpath for packaged classes can have intricate issues. I recommend
you to read J2SE standard doc /tooldocs/solaris/classpath.html,
especially the last part of the doc.
 
Joined
Aug 21, 2007
Messages
1
Reaction score
0
java.lang.NoClassDefFoundError: com/ibm/mq/server/MQSESSION

Hi,
well I am facing the same issue while accessing the MQ. The error I am getting is

java.lang.NoClassDefFoundError: com/ibm/mq/server/MQSESSION
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:68)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:493)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:155)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:153)

at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:189)

at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:171)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:754)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:688)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:417)
at clyde.qbase.impl.MQ.QMQQueueMgrConnection.getMQManager(Unknown Source)
at clyde.qbase.impl.MQ.QMQQueueMgrConnection.rollback(Unknown Source)
at clyde.qbase.queue.PoolableQMgrCnxn$5.doit(Unknown Source)
at clyde.qbase.queue.PoolableQMgrCnxn.tryOperation(Unknown Source)
at clyde.qbase.queue.PoolableQMgrCnxn.rollback(Unknown Source)
at clyde.qbase.queue.QueueMgrConnection.rollback(Unknown Source)
at clyde.qbase.queue.QueueTransaction.rollback(Unknown Source)
at clyde.q.server.QMsgServerImp.run(Unknown Source)
at clyde.q.server.QMsgServer.run(Unknown Source)
at com.nm.cbpel.server.CBPELRunnable.run(CBPELRunnable.java:126)
at clyde.core.thread.WorkerThreadManager$WorkerRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:568)


I checked the class and it looks fine. Also the com.ibm.mq.jar I am using is the new jar and not an old one. I also set the classpath in my environment varibales but still was not able to resolve the issue. Can someone tell me what can be the possible issue. Its urgent...

Thanks a lot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top