3
votes

I am working on a project where MQ client (Support PAC 7) is installed on one 64-bit Linux machine and it sends messages to server.

On client machine we are using 64-bit linux JDK 1.6.25

java -version

 java version "1.6.0_25"

I have following environment variable set up

 MQSERVER='my_channel/tcp/SRVD10995(1414)'
 MQ_INSTALL_ROOT=/var/mqm/
 MQ_JAVA_DATA_PATH=/var/mqm/
 MQ_JAVA_INSTALL_PATH=/opt/mqm/java/
 MQ_JAVA_LIB_PATH=/opt/mqm/java/lib64
 LD_LIBRARY_PATH=/opt/mqm/java/lib64
 CLASSPATH= /opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/com.ibm.mqjms.jar:/opt/mqm/samp/jms/samples:/opt/mqm/samp/wmqjava/samples

but when I run following command

dspmqver -p 6

For native libraries I am seeing following message:

 Name:        IBM WebSphere MQ
 Version:     7.0.1.6
 CMVC Level:  k701-106-110721 mqjbnd=CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd' was not found. [3=mqjbnd]::no mqjbnd in java.library.path
 Build Type:  Production

I am also getting same error message when I execute JMS code to connect to server. I do not have libmqjbnd.so is not in the /opt/mqm/java/lib64 folder, and not even in 32 bit folder.

I have couple of questions :

1) How do I fix this problem for client installation? 2) Does the library file (.so) need to be there in that directory ?

I will be thankful if anyone provides me answer to above questions, I have already invested many hours in this but no joy.

3

3 Answers

2
votes

There's a Technote on this specific question here. Let us know if the solution presented there does not resolve your problem.

Update: I noticed a mismatch between your CLASSPATH which is pointing to the 32-bit libs and the other variables pointing to the 64-bit libs. WMQ provides scripts that set the variables for you as described in the Infocenter:

On a UNIX system, you can use the script setjmsenv (if you are using a 32-bit 
JVM) or setjmsenv64 (if you are using a 64-bit JVM) to set the environment
variables. On AIX, these scripts are in the /usr/mqm/java/bin directory and,
on HP-UX, Linux, and Solaris, they are in the /opt/mqm/java/bin directory.

Many people source the scripts in their .profile. Have you tried running these? Remember that simply running the script...

/opt/mqm/java/bin/setjmsenv64

...does not result in the env vars being set in the current shell. The script must be sourced using the dot syntax as follows:

. /opt/mqm/java/bin/setjmsenv64

What results do you get after sourcing the appropriate setjmsenv or setjmsenv64 script?

2
votes

Whether you need the libraries depends how you want to send messages to the server. WebSphere MQ allows you to choose between bindings mode and client mode. Bindings mode uses the libraries with some IPC while client mode is purely Java and TCP based. If your programming language is Java then i would choose client mode.

0
votes

This message occurs also when you forget to set properties for host, port, ... This is in case of standalone MQ client.

MQEnvironment.hostname = "mqm.onZos.myCompany.com";
MQEnvironment.port = 1234;
MQEnvironment.channel = "SYSTEM.MYCH.NAME";