views:

129

answers:

1

hi, i am using MQ7 and trying to access a queue with JMS api's. Getting this error. Has anyone seen it before? How do i resolve this? TIA

Exception in thread "main" com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI. The Java(tm) MQI has thrown an exception describing the problem. See the linked exception for further information.

Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd' was not found. [3=mqjbnd]

Caused by: java.lang.UnsatisfiedLinkError: no mqjbnd in java.library.path

+2  A: 

This is almost always caused by a combination of an incomplete client install and/or a CLASSPATH issue. Many people grab the jar files rather than performing the complete install and do not necessarily get all of them. In addition to insuring all required binaries are present, using the install media provides several additional capabilities such as diagnostics and trace. It also assures that maintenance can be applied. The WMQ client install media are available for free download as SupportPac MQC7. The CLASSPATH setting should be as described in the WebSphere MQ Using Java manual.

If the client install is performed from the IBM media and the environment is set up as per the docs, this fixes nearly all cases such as you have reported here. There are a few Install Verification Test apps (some of those diagnostics installed with the full media that I mentioned) which are described here and which can help determine if a problem is with the installation or with the code.

T.Rob
The scenario is i am using a java program to access a MQ queue deployed on a separate machine via JMS,so i got all the required MQ client libs from the server, the weirdness lies in the fact that the same program runs perfectly on the server where MQ is deployed with the same jars in classpath, may be it has something to do with java.library.path prop, any more ideas. :)
hakish
The error message clearly says that java.library.path is missing mqjbnd. If you go to the server on which it works, I'm sure you'll find that its java.library.path is set properly. Make yours the same and it'll work, I'm sure.
duffymo
This is the reason that IBM does not support this type of install. If you use the MQC7 SupportPac to install the client then you get *all* the required libs and jars as well as diagnostic utilities. According to your comment, the one place where the install media was used, it works. Why not use the documented and supported procedure to install the client libs? Then you could open PMRs if needed and apply maintenance. Or are these things not important for your application?
T.Rob
it works when the client and server reside in the same machine, but not in separate..
hakish
Or from my perspective, it works on the machine where IBM's install media was run and not on the machine where the jars were installed by copying them over. As an IBM consultant specializing in WMQ I see this a lot. The first thing I get my clients to do is run the supported install as per the documentation. This fixes 80% ~ 90% of the problems such as you are reporting. If you are unwilling to run the install media on the client machine, I can't help you further. If it still doesn't work with the full install, I'd ask to see the output of the Initial Verification Test program run.
T.Rob