IBM Support

UnsatisfiedLinkError: mqjbnd (Not found in java.library.path), CC=2;RC=2495 AMQ8568: The native JNI library 'mqjbnd' was not found. [3=mqjbnd]

Troubleshooting


Problem

You are using WebSphere Application Server Version 7 or 8 and using transport type of Bindings for a Java™ Message Service (JMS) Connection Factory or an Activation Specification that is connecting to a local WebSphere MQ queue manager, and you are getting errors in the SystemOut.log or trace.log.

Symptom


[time stamp] 00000000 LocalMQ$      3   (LocalMQ$) [:/e790e79] Caught exception: java.lang.UnsatisfiedLinkError: mqjbnd (Not found in java.library.path) in class: LocalMQ$ method: run() <exitIndex: 2>
[time stamp] 00000000 LocalMQ$      1   (LocalMQ$) [:/e790e79] Tracing exception:
java.lang.UnsatisfiedLinkError: mqjbnd (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1011)
...
[time stamp] 00000000 LocalMQ$      <  run() (LocalMQ$) [:/e790e79] Exit
                                com.ibm.mq.jmqi.JmqiException: CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd' was not found. [3=mqjbnd]
at com.ibm.mq.jmqi.local.LocalMQ$1.run(LocalMQ.java:294),
Caused by: java.lang.UnsatisfiedLinkError: mqjbnd (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1011),
[time stamp] 00000000 LocalMQ       1   (LocalMQ) [:/4960496] Tracing exception:
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd' was not found. [3=mqjbnd]
at com.ibm.mq.jmqi.local.LocalMQ$1.run(LocalMQ.java:294)

Resolving The Problem

Note:
The following procedure only works on the IBM JVM platforms (AIX, Linux, Windows) and not on HP-UX or Solaris. See footnote regarding HP-UX and Solaris

It is required for bindings mode applications that the JMS runtime must access the appropriate "bindings module" in the "native" WMQ libraries.
The WMQ Resource Adapter's "native library path" must be configured to point to the WMQ directory where these libraries are located.

For more information see the following web page from the WebSphere Application Server V7 documentation: Configuring the WebSphere MQ messaging provider with native libraries information

From the WAS Administrative Console, select:
Resources > JMS > JMS providers > WebSphere MQ messaging provider




- Select the WebSphere MQ messaging provider that is at the correct Scope for the connection factory or activation specification that will create the bindings mode connection.
Note that native path information at Server scope is used in preference to native path information at higher scopes, and native path information at Node scope is used in preference to native path information at Cell scope.

- Under General Properties, in the Native library path property, enter the full name of the directory that contains the WebSphere MQ native libraries.

The bitness of the MQ libraries depends on the bitness of the WAS JVM.
Enter only one directory name.

AIX, WAS 32-bit JVM: /usr/mqm/java/lib
AIX, WAS 64-bit JVM: /usr/mqm/java/lib64

Linux 64-bit, WAS 32-bit JVM: /opt/mqm/java/lib
Linux 64-bit, WAS 64-bit JVM: /opt/mqm/java/lib64

Linux 32-bit: /opt/mqm/java/lib

Windows 32=bit: C:\Program Files\IBM\WebSphere MQ\java\lib

Windows 64-bit :
WAS 32-bit JVM C:\Program Files (x86)\IBM\WebSphere MQ\java\lib
WAS 64-bit JVM C:\Program Files (x86)\IBM\WebSphere MQ\java\lib64

- Click OK and save any changes to the master configuration.

- If you are running in an application server environment, you must restart all affected servers twice when you have changed the native path information. Otherwise, a WMSG1623E message is produced, indicating that the WebSphere MQ messaging provider is not available.


+++ Note for HP-UX and Solaris

On these platforms, the mechanism to update the native library path in WAS is to add the JVM startup argument:

-Djava.library.path

and specifying the location of the MQ native libraries:

HP-UX (64-bit): /opt/mqm/java/lib64
Solaris (64-bit): /opt/mqm/java/lib64

This will have the same effect on Solaris as setting LD_LIBRARY_PATH (which the JVM uses to configure java.library.path at startup)

[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.0;7.5;7.1;7.0.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java Message Service (JMS)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.0;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

WMQ WebSphere MQ

Document Information

Modified date:
15 June 2018

UID

swg21596196