IBM Support

IT33852: MQ classes for JMS generate NullPointerExceptions when an application is accessing a queue or a topic

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • An IBM MQ classes for JMS application contains the following
    logic:
    
    - Look up a connection factory that contains information about
    how to connect to an MQ queue manager using the CLIENT
    transport.
    - Create a JMSContext from the connection factory.
    - Use the JMSContext to create a queue destination representing
    a queue on the queue manager.
    - Create an anonymous JMSProducer.
    - Use the anonymous JMSProducer to send a JMS TextMessage to the
    queue destination.
    
    as shown in the code snippet below:
    
    .....
    // Create the JMSContext from the connection factory.
    JMSContext ctx = cf.createContext(JMSContext.AUTO_ACKNOWLEDGE);
    ctx.start();
    
    // Create a Queue Destination for the queue testQueue
    Queue q = ctx.createQueue("testQueue");
    
    // Put a message to the queue.
    ctx.createProducer().send(q, "TestMessage");
    .....
    
    When the application is run, the following NullPointerException
    occurs:
    
    java.lang.NullPointerException
    at
    com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.doPut1(InterceptedJmqiIm
    pl.java:1083)
    at
    com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiPut1(InterceptedJmqi
    Impl.java:985)
    at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiPut1(ESEJMQI.java:672)
    at
    com.ibm.msg.client.wmq.internal.WMQMessageProducer$SpiUnidentifi
    edProducerShadow.sendInternal(WMQMessageProducer.java:1038)
    at
    com.ibm.msg.client.wmq.internal.WMQMessageProducer$ProducerShado
    w.send(WMQMessageProducer.java:567)
    at
    com.ibm.msg.client.wmq.internal.WMQMessageProducer.send(WMQMessa
    geProducer.java:1433)
    at
    com.ibm.msg.client.jms.internal.JmsMessageProducerImpl.sendMessa
    ge(JmsMessageProducerImpl.java:855)
    at
    com.ibm.msg.client.jms.internal.JmsMessageProducerImpl.synchrono
    usSendInternal(JmsMessageProducerImpl.java:2055)
    at
    com.ibm.msg.client.jms.internal.JmsMessageProducerImpl.sendInter
    nal(JmsMessageProducerImpl.java:1993)
    at
    com.ibm.msg.client.jms.internal.JmsMessageProducerImpl.send(JmsM
    essageProducerImpl.java:1535)
    at
    com.ibm.msg.client.jms.internal.JmsProducerImpl.send(JmsProducer
    Impl.java:818)
    ...
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the IBM MQ classes for JMS.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When an MQ classes for JMS application attempts to access a
    queue, the MQ classes for JMS perform a check to see if there is
    an Advanced Message Security (AMS) policy for that queue. This
    ensures that the user running the application is allowed to
    access the queue.
    
    To perform this check, the MQ classes for JMS attempted to read
    messages from the system queue SYSTEM.PROTECTION.POLICY.QUEUE.
    If no message was initially found on the queue, the MQ classes
    for JMS would attempt to read messages again. If the second
    attempt to get a message completed successfully, the MQ classes
    for JMS would fail to process the policy correctly. When the MQ
    classes for JMS subsequently tried to use the policy
    information, a NullPointerException was thrown.
    

Problem conclusion

  • The IBM MQ classes for JMS have been updated to correctly
    process AMS policy information in the situation where the
    messages containing the policy information is not available
    initially and is read on the second attempt.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.1 LTS   9.1.0.8
    v9.2 LTS   9.2.0.2
    v9.x CD    9.2.1
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT33852

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7271

  • Reported release

    915

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-08-10

  • Closed date

    2020-11-16

  • Last modified date

    2020-11-24

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    IBM MQ BASE MP

  • Fixed component ID

    5724H7271

Applicable component levels

[{"Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"915"}]

Document Information

Modified date:
25 November 2020