Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Tatyana Lomberg
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!