File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes java.lang.NoClassDefFoundError: com/ibm/mqbind/MQSESSION Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "java.lang.NoClassDefFoundError: com/ibm/mqbind/MQSESSION" Watch "java.lang.NoClassDefFoundError: com/ibm/mqbind/MQSESSION" New topic

java.lang.NoClassDefFoundError: com/ibm/mqbind/MQSESSION

Tatyana Lomberg

Joined: Apr 16, 2009
Posts: 1

I am trying to write a simple Java program which puts MQ Messages onto a queue.

I was given a sample program and an mq library, but I can't get it to compile.

public class MQTestPut {

private static String qManager = "DCWQ"; // define name of queue manager object to connect to.
private static MQQueueManager qMgr; // define a queue manager object

private static String hostName = "austin";

private static int port = 1415; // port to connect to. If not set, this defaults to 1414 for WebSphere MQ
// client connections.

private static String channel = "SYSTEM.ADMIN.SVRCONN"; // the CASE-SENSITIVE name of the SVRCONN channel on the queue manager

private static MQQueue system_default_local_queue = null;

private static String queueName = "TATYANA_TEMP";


System.out.println("Creating MqQMngr");

qMgr = new MQQueueManager(qManager);

System.out.println("Finished creating MqQMngr");

When I try to create an MQQueueManager, I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mqbind/MQSESSION
at MQTestPut.test(
at MQTestPut.main(

the MQ library jar that I am using has the following packages:,, has classes such as MQSESSION, MQSESSIONClient and MQSESSIONServer. does not have MQSESSION class.

I thought that perhaps I was given a bad jar file. However, upon looking thru the repository containing other applications, they also use a similar jar that does not have the in them.

Can someone help me w/ some advice? I couldn't find anything on the Net on this topic.

Your help will be much appreciated!

I agree. Here's the link:
subject: java.lang.NoClassDefFoundError: com/ibm/mqbind/MQSESSION
It's not a secret anymore!