MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

IBM MQ Authentication Error After Version Upgrade - JMSWMQ2013 / MQRC_NOT_AUTHORIZED

  • 1.  IBM MQ Authentication Error After Version Upgrade - JMSWMQ2013 / MQRC_NOT_AUTHORIZED

    Posted Wed March 19, 2025 09:32 AM
    Edited by Lorraine Rizzuto Thu March 20, 2025 09:42 AM

    Hi IBM Support Team,

    I am encountering an issue after upgrading our application dependencies and Java version. Here are the details:

    Environment Details:

    • Application Framework: Quarkus 3.15.3.SP1-redhat-00002
    • Java Version: Java 21
    • IBM MQ Version: 9.3.4
    • Dependencies:
      <dependency> <groupId>com.ibm.mq</groupId> <artifactId>com.ibm.mq.jakarta.client</artifactId> <version>9.3.4.0</version> </dependency>

    Problem:

    We have an application that was previously working fine with IBM MQ version 9.3.4 using Quarkus 2.13.7.SP2 and Java 17. The application used to consume messages from a queue with no authentication or user credentials using the default system channel.

    However, after upgrading to Quarkus 3.15.3.SP1 (Java 21) and changing the MQ client dependency to com.ibm.mq.jakarta.client:9.3.4.0, we are now encountering the following error during JMS message consumption:

    Error Message:

    Caused by: com.ibm.msg.client.jakarta.jms.DetailedJMSSecurityException: JMSWMQ2013: The security authentication was not valid that was supplied for queue manager 'QM1' with connection mode 'Client' and host name '10.0.0.1(1418)'. Please check if the supplied username and password are correct on the queue manager to which you are connecting. For further information, review the queue manager error logs and the Securing IBM MQ topic within IBM Documentation. Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').

    Configuration:

    We are connecting to an IBM MQ 9.3.4 instance with a Queue Manager (QM1) that does not require any user credentials and is using the default SYSTEM.DEF.SVRCONN channel.

    Here is the relevant part of the configuration:

    @Named("ibm-connection-factory-consumer") public ConnectionFactory ibmConnectionFactory() throws JMSException { MQConnectionFactory connectionFactory = new MQConnectionFactory(); connectionFactory.setQueueManager(consumer.getQueueManager()); connectionFactory.setPort(consumer.getPort()); connectionFactory.setHostName(consumer.getHostName()); connectionFactory.setTransportType(1); // Client connection connectionFactory.setChannel(consumer.getChannel()); return connectionFactory; }

    Steps to Reproduce:

    1. Upgrade from Quarkus 2.13.7.SP2 (Java 17) to Quarkus 3.15.3.SP1 (Java 21).
    2. Change IBM MQ dependencies to version 9.3.4.0.
    3. Attempt to consume messages from the queue.

    Expected Behavior:

    The application should be able to consume messages from the queue without requiring authentication, as before the upgrade.

    Issue:

    After the upgrade, we are encountering a JMSWMQ2013 error related to authentication (MQRC_NOT_AUTHORIZED), even though no username or password is required by the Queue Manager (QM1) or the channel (SYSTEM.DEF.SVRCONN).

    Request:

    Can you assist us in diagnosing and resolving this issue? We believe there might be a configuration or compatibility issue after the version change, or potentially a change in how IBM MQ handles security with the new Jakarta client libraries.

    Thank you for your assistance.



    ------------------------------
    David Fonseca
    ------------------------------