Date Created: Mon 07-Mar-2011

Related Document Categories:

Get my WebSphere MQ course here >> http://www.themiddlewareshop.com/products/


Error in MQ Java Client

AMQ8568 The native JNI library mqjbnd was not found


There were my jars




Exception in thread "main" java.lang.NoClassDefFoundError: javax/resource/ResourceException
at com.ibm.mq.MQQueueManager.<clinit>(MQQueueManager.java:153)
at com.fr.utils.PingQueueManager.PingStatus(PingQueueManager.java:24)
at com.fr.MQProcessor.connectionValid(MQProcessor.java:397)
at com.fr.MQProcessor.mainProcessor(MQProcessor.java:194)
at com.fr.MQProcessor.start(MQProcessor.java:110)
at com.fr.MQProcessor.main(MQProcessor.java:168)
Caused by: java.lang.ClassNotFoundException: javax.resource.ResourceException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more

I was missing com.ibm.mq.commonservices



I then got this error

MQJE001: Completion Code '2', Reason '2495'.
com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2495'.
at com.ibm.mq.MQSESSION.<init>(MQSESSION.java:2075)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:2112)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:202)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:248)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:302)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:95)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:182)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:869)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:761)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:712)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:171)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:603)
at com.fr.utils.PingQueueManager.PingStatus(PingQueueManager.java:26)
at com.fr.MQProcessor.connectionValid(MQProcessor.java:406)
at com.fr.MQProcessor.mainProcessor(MQProcessor.java:194)
at com.fr.MQProcessor.start(MQProcessor.java:110)
at com.fr.MQProcessor.main(MQProcessor.java:168)
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd' was not found. [3=mqjbnd]


Reason, The class path of the Java Listener was not referencing the correct MQ Libs. This is clearly an classpath issue.

Get my WebSphere MQ course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


  • Linked In
  • Twitter
  • About Me
  • My Blog
  • Contact Me

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories