Websphere MQ 客户端安装

发布于 2024-12-04 03:11:28 字数 1115 浏览 1 评论 0原文

我正在开发一个项目,其中 MQ 客户端(支持 PAC 7)安装在一台 64 位 Linux 计算机上,并将消息发送到服务器。

在客户端计算机上,我们使用 64 位 linux JDK 1.6.25

java -version

 java version "1.6.0_25"

我设置了以下环境变量

 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

,但是当我运行以下命令

dspmqver -p 6

对于本机库时,我看到以下消息:

 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

我也收到相同的错误消息当我执行 JMS 代码连接到服务器时。我没有 libmqjbnd.so 不在 /opt/mqm/java/lib64 文件夹中,甚至不在 32 位文件夹中。

我有几个问题:

1)如何解决客户端安装的这个问题? 2)库文件(.so)是否需要位于该目录中?

如果有人为我提供上述问题的答案,我将不胜感激,我已经为此投入了很多时间,但没有感到高兴。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不爱素颜 2024-12-11 03:11:28

此处有关于此特定问题的技术说明。如果此处提供的解决方案无法解决您的问题,请告诉我们。

更新:我注意到指向 32 位库的 CLASSPATH 与指向 64 位库的其他变量之间不匹配。 WMQ 提供了为您设置变量的脚本 如信息中心所述:

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.

许多人在他们的 .profile 中获取脚本。您尝试过运行这些吗?请记住,仅运行脚本...

/opt/mqm/java/bin/setjmsenv64

...不会导致在当前 shell 中设置环境变量。该脚本必须使用点语法获取,如下所示:

. /opt/mqm/java/bin/setjmsenv64

获取适当的 setjmsenv 或 setjmsenv64 脚本后会得到什么结果?

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?

北方的韩爷 2024-12-11 03:11:28

您是否需要这些库取决于您想要如何向服务器发送消息。 WebSphere MQ 允许您在绑定模式和客户端模式之间进行选择。绑定模式使用带有一些 IPC 的库,而客户端模式纯粹基于 Java 和 TCP。
如果你的编程语言是Java那么我会选择客户端模式。

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.

青衫儰鉨ミ守葔 2024-12-11 03:11:28

当您忘记设置主机、端口等属性时,也会出现此消息。
这是独立 MQ 客户端的情况。

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

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";
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文