I'm using IBM java librarys to connect an IBM MQ system.
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.allclient</artifactId>
<version>9.4.1.1</version>
</dependency>
My settings are:
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
factory.setHostName("myserver");
factory.setPort(1451);
factory.setQueueManager("TIPPP");
factory.setChannel("TIPPP.CL.GGG");
factory.setTransportType(WMQConstants.WMQ_CM_CLIENT);
factory.setUserAuthenticationMQCSP(true);
when trying to open the connection:
connection = (MQQueueConnection)
factory.createQueueConnection("usr","llalalalalalalalalalalalalalaal");
// Yes, the pwd is quite long
I receive this response:
Caused by: com.ibm.mq.MQException: JMSCMQ0001: Der IBM MQ-Aufruf ist mit Beendigungscode '2' ('MQCC_FAILED') und Ursache '2035' ('MQRC_NOT_AUTHORIZED') fehlgeschlagen.
I contacted the IBM MQ Admin and he told me that my user has no right to execute an "inquire" on the queuemanager. I do have rights for the queue itself, but not to execute this on the manager.
AMQ8077W: Entity 'usr' has insufficient authority to access object TIPPP
[qmgr].
EXPLANATION:
The specified entity is not authorized to access the required object. The
following requested permissions are unauthorized: inq
ACTION: ...
I tried everything: ConnectionFactory, QueueManagerFactory.. but it always runs this inquire on the manager.
Do I have to adjust my connection settings or is this right to call an inquire just necessary for the (java) library? I have to mention that I want to write in one queue and have a listener on another queue for receiving.
Thanks!
All Object-Oriented Languages (i.e. Java, C#, etc.) that connect to a queue manager require 'inquire' privileges on the queue manager and 'inquire' privileges on any queues that are opened by the application.