IBM Support

IT32987: NullPointerException occurs when activation specification or WASlistener port is configured to use message retention

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

  • When using WebSphere Application Server V9.0.5.1, the following
    resources have been defined using the WebSphere Administrative
    Console:
    
    - An IBM MQ messaging provider connection factory which contains
    details about how to connect to a queue manager using the CLIENT
    transport. The connection factory has the "Retain messages, even
    if no matching consumer is available" checkbox unselected.
    - An IBM MQ messaging provider queue destination that maps to a
    queue on the queue manager.
    - Two listener ports, both of which use the connection factory
    and queue destination definitions mentioned above.
    
    Two different enterprise applications had been deployed into the
    application server. Each application server is bound to a
    different listener port.
    
    When the application server starts, one of the listener ports
    fails to start and the following error message is written to the
    SystemOut.log file:
    
    WMSG0019E: Unable to start MDB Listener MDB, JMSDestination
    jms/testQueue : java.lang.NullPointerException
    	at java.util.Hashtable.put(Hashtable.java:505)
    	at
    com.ibm.msg.client.wmq.internal.WMQMessageRetentionProcessor$WMQ
    MessageRetentionAgent.addBrowser(WMQMessageRetentionProcessor.ja
    va:102)
    	at
    com.ibm.msg.client.wmq.internal.WMQMessageRetentionProcessor.reg
    isterConnectionBrowser(WMQMessageRetentionProcessor.java:355)
    	at
    com.ibm.msg.client.wmq.internal.WMQConnectionBrowser.<init>(WMQC
    onnectionBrowser.java:1480)
    	at
    com.ibm.msg.client.wmq.internal.WMQConnection.createConnectionBr
    owser(WMQConnection.java:849)
    	at
    com.ibm.msg.client.jms.internal.JmsConnectionImpl.createConnecti
    onBrowser(JmsConnectionImpl.java:1360)
    	at
    com.ibm.msg.client.jms.internal.JmsConnectionConsumerImpl.create
    ConnectionBrowser(JmsConnectionConsumerImpl.java:259)
    	at
    com.ibm.msg.client.jms.internal.JmsConnectionConsumerImpl.<init>
    (JmsConnectionConsumerImpl.java:180)
    	at
    com.ibm.msg.client.jms.internal.JmsConnectionConsumerImpl.<init>
    (JmsConnectionConsumerImpl.java:125)
    	at
    com.ibm.msg.client.jms.internal.JmsConnectionImpl.createConnecti
    onConsumer(JmsConnectionImpl.java:658)
    	at
    com.ibm.msg.client.jms.internal.JmsXAConnectionImpl.createConnec
    tionConsumer(JmsXAConnectionImpl.java:235)
    	at
    com.ibm.mq.jms.MQConnection.createConnectionConsumer(MQConnectio
    n.java:204)
    	at
    com.ibm.ejs.jms.JMSConnectionHandle.createConnectionConsumer(JMS
    ConnectionHandle.java:1309)
    	at
    com.ibm.ejs.jms.listener.MDBListenerImpl.createResources(MDBList
    enerImpl.java:550)
    	at
    com.ibm.ejs.jms.listener.MDBListenerImpl.internalStart(MDBListen
    erImpl.java:738)
    	at
    com.ibm.ejs.jms.listener.MDBListenerImpl.restart(MDBListenerImpl
    .java:711)
    	at
    com.ibm.ejs.jms.listener.MDBListenerImpl.alarm(MDBListenerImpl.j
    ava:1134)
    	at com.ibm.ejs.util.am._Alarm.runImpl(_Alarm.java:151)
    	at com.ibm.ejs.util.am._Alarm.run(_Alarm.java:136)
    	at
    com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects three categories of user:
    
    Category 1:
    ---------------
    Users of the IBM MQ resource adapter who have:
    
    - Defined two or more activation specifications that monitor the
    same JMS destination, where at least one of the activation
    specifications have the "messageRetention" property set to the
    value "false".
    - And have at least one enterprise application deployed that use
    one of the activation specifications, and does not specify a
    message selector.
    
    Category 2:
    ---------------
    Users of the WebSphere Application Server IBM MQ messaging
    provider who have:
    
    - Defined two or more activation specifications that monitor the
    same JMS destination, where at least one of the activation
    specifications has the checkbox "Retain messages, even if no
    matching consumer is available" unselected.
    - And have at least one enterprise application deployed that
    uses one of the activation specifications, and does not specify
    a message selector.
    
    Category 3:
    ---------------
    Users of the WebSphere Application Server IBM MQ messaging
    provider who have:
    
    - Defined IBM MQ messaging provider connection factories that
    have the checkbox "Retain messages, even if no matching consumer
    is available" unselected.
    - And created an IBM MQ messaging provider destination.
    - And have two or more listener ports configured to use the one
    of the connection factories, and the destination.
    - And have deployed enterprise applications that are bound to
    one of the listener ports, where at least one of the
    applications does not specify a message selector.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    The message retention functionality provided by the IBM MQ
    resource adapter (which is embedded into WebSphere Application
    Server, and handles all of the communication between the
    application server and a queue manager) allows users to specify
    what happens if:
    
    - An activation specification or WebSphere Application Server
    listener port is monitoring a JMS destination for messages that
    match a message selector.
    - And a message is found that doesn't match the selector.
    
    By default, messages that don't match the selector are left on
    the destination. However, if:
    
    - Either the IBM MQ activation specification property
    "messageRetention" is set to false.
    - Or the WebSphere Application Server IBM MQ messaging provider
    connection factory definition used by a listener port has the
    checkbox "Retain messages, even if no matching consumer is
    available" unselected.
    
    then the IBM MQ resource adapter will create an internal
    MessageRetentionAgent and use it to remove any messages that
    don't match the selector from the destination. This prevents the
    JMS destination from filling up with messages that will never be
    processed.
    
    In the situation that:
    
    - Either the IBM MQ activation specification property
    "messageRetention" is set to false.
    - Or the WebSphere Application Server IBM MQ messaging provider
    connection factory definition used by a listener port has the
    checkbox "Retain messages, even if no matching consumer is
    available" unselected.
    
    and the enterprise application using the activation
    specification or listener port does not specify a message
    selector, then the MessageRetentionAgent will not remove any
    messages from the destination.  This is because all of the
    messages on the destination are suitable for delivery to the
    application, as it is not using a selector.
    
    There is one internal MessageRetentionAgent per destination. If
    two or more activation specifications or listener ports are
    configured to monitor the same destination, they share the same
    MessageRetentionAgent. In this situation, the
    MessageRetentionAgent will only remove message that don't match
    either selector from the destination. If one or more of the
    applications has not specified a selector, then no messages will
    be removed from the queue.
    
    Now:
    
    - If two or more activation specifications or listener ports
    were configured to monitor the same destination.
    - And at least one of the enterprise applications using the
    activation specification or listener ports did not specify a
    message selector.
    
    then it was possible for the MessageRetentionAgent to try to
    register the activation specifications or listener ports with a
    null value for the message selector. If this happened, then the
    following exception would be thrown:
    
    NullPointerException
    &#09;at java.util.Hashtable.put(Hashtable.java:505)
    &#09;at
    com.ibm.msg.client.wmq.internal.WMQMessageRetentionProcessor$WMQ
    MessageRetentionAgent.addBrowser(WMQMessageRetentionProcessor.ja
    va)
    &#09;at
    com.ibm.msg.client.wmq.internal.WMQMessageRetentionProcessor.reg
    isterConnectionBrowser(WMQMessageRetentionProcessor.java)
    &#09;at
    com.ibm.msg.client.wmq.internal.WMQConnectionBrowser.<init>(WMQC
    onnectionBrowser.java)
    &#09;at
    com.ibm.msg.client.wmq.internal.WMQConnection.createConnectionBr
    owser(WMQConnection.java)
    &#09;at
    com.ibm.msg.client.jms.internal.JmsConnectionImpl.createConnecti
    onBrowser(JmsConnectionImpl.java)
    &#09;at
    com.ibm.msg.client.jms.internal.JmsConnectionConsumerImpl.create
    ConnectionBrowser(JmsConnectionConsumerImpl.java)
    &#09;at
    com.ibm.msg.client.jms.internal.JmsConnectionConsumerImpl.<init>
    (JmsConnectionConsumerImpl.java)
    &#09;at
    com.ibm.msg.client.jms.internal.JmsConnectionConsumerImpl.<init>
    (JmsConnectionConsumerImpl.java)
    &#09;at
    com.ibm.msg.client.jms.internal.JmsConnectionImpl.createConnecti
    onConsumer(JmsConnectionImpl.java)
        .....
    
    and the activation specification or listener port would fail to
    start.
    

Problem conclusion

  • To resolve this issue, the IBM MQ resource adapter has been
    updated to ensure that:
    
    - If two or more activation specifications or listener ports are
    configured to monitor the same destination.
    - And at least one of the enterprise applications using the
    activation specification or listener ports does not specify a
    message selector.
    
    then the MessageRetentionAgent will always register the
    activation specification or listener port using the special
    selector string "<NULL>". This ensures that the activation
    specifications or listener ports are registered successfully,
    and prevents the NullPointerException from occurring.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.1 LTS   9.1.0.7
    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

    IT32987

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7271

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-05-27

  • Closed date

    2020-06-19

  • Last modified date

    2020-12-03

  • 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":"910"}]

Document Information

Modified date:
04 December 2020