IBM Support

IT27944: IBM MQ classes for JMS throw a java.lang.NullPointerException from JmsProducerImpl

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 application creates a JMSContext, and then uses the
    JMSContext to create a JMSProducer for a destination. The
    JMSContext is closed. If the application then tries to send a
    message using the JMSProducer, the IBM MQ classes for JMS throw
    a java.lang.NullPointerException with the following stack:
    
    Exception in thread "main" java.lang.NullPointerException
    	at
    com.ibm.msg.client.jms.internal.JmsProducerImpl.updateInternalPr
    oducer(JmsProducerImpl.java:1868)
    	at
    com.ibm.msg.client.jms.internal.JmsProducerImpl.send(JmsProducer
    Impl.java:828)
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects applications that use the JMS 2.0 API
    provided by the IBM MQ classes for JMS.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    Every JMSProducer object created from an JMSContext has an
    internal "message producer" object.
    
    When a JMSContext was closed, the internal "message producer"
    objects associated with the JMSProducers created from the
    JMSContext was set to null. If an application then tried to use
    one of the JMSProducers to send a message, a
    java.lang.NullPointerException would be thrown as the MQ classes
    for JMS would try to use the "message producer" object that had
    been set to null.
    

Problem conclusion

  • The IBM MQ classes for JMS have been updated so that, if a
    JMSContext is closed, the internal "message producer" object
    associated with any JMSProducers created from the JMSContext is
    no longer set to null. As a result of this, change, if an
    application then tries to use one of the JMSProducers to send a
    message, a JMSRuntimeException is thrown containing the message:
    
    JMSCC0026: This message producer is closed.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.0 LTS   9.0.0.7
    v9.1 CD    9.1.3
    v9.1 LTS   9.1.0.2
    
    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

    IT27944

  • Reported component name

    IBM MQ BASE M/P

  • Reported component ID

    5724H7261

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-01-31

  • Closed date

    2019-02-12

  • Last modified date

    2019-02-12

  • 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 M/P

  • Fixed component ID

    5724H7261

Applicable component levels

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

Document Information

Modified date:
12 February 2019