I am trying to connect a queue manager from a standalone program and am getting the following error.

Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').

I understand that the connecting ID needs to be configured at the MQ to allow this connection.

But strangely, when I try to connect from Websphere Application Server (WAS), I am successfully connected to the queue. My standalone program is using the same JDK as WAS.

Should the JVM ID for both these programs be the same?

I am using a CCDT file to connect to the queue.

有帮助吗?

解决方案

Well it is authorization error on client connection. No doubt about that. See here for troubleshooting technote.

For start make sure that user which are you using is given proper rights (it isn't). Make sure that you are not using MQ administrator account with WMQ v7.1 or newer. Since 7.1 MQ Administrators are not allowed to create client connection with default configuration. This default can be changed. See here.

One option is to use MCA user on client channel. This overrides whatever user you are passing. It is explained here.

WAS is either using different user or bindings connection mode.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top