IBM Support

IV15695: NULLPOINTEREXCEPTION THROWN WHEN USING THE WEBSPHERE MQ V7 CLASSES FOR JAVA AND SETTING THE FORMAT OF AN MQMESSAGE TO NULL

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A NullPointerException is thrown when an a WebSphere MQ V7
    classes for Java application has set the format of an
    com.ibm.mq.MQMessage to NULL before attempting a PUT to a
    queue, for example using the following code snippet:
    
    MQQueueManager qm = new MQQueueManager("sampleQM");
    MQQueue q = qm.accessQueue("Q1", MQC.MQOO_OUTPUT);
    
    MQMessage m = new MQMessage();
    m.format =  null;
    q.put(m, new MQPutMessageOptions());
    

Local fix

  • LOCAL FIX:
    Initialize the message descriptor format to something other
    than NULL
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects a user of the WebSphere MQ classes for Java
    version 7.0 and 7.1, who have applications which set the format
    of an WebSphere MQ Message to NULL before putting the message
    to a queue.
    
    Platforms affected:
    All Distributed (iSeries, all Unix and Windows) +Java
    ****************************************************************
    PROBLEM SUMMARY:
    A NullPointerException was thrown when an application set the
    format of an com.ibm.mq.MQMessage to NULL before attempting a
    PUT to a queue.  This worked successfully when using the
    WebSphere MQ V6 classes for Java.
    

Problem conclusion

  • The code was modified such that when the application sets the
    format of an com.ibm.mq.MQMessage to NULL, and then attempts to
    put the message to a queue, the format is updated to its default
    value of 8 space characters, "        ".
    
    This replicates the behavior of the WebSphere MQ V6 classes for
    Java, and prevents the NullPointerException from being thrown.
    
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
                       v7.0
    Platform           Fix Pack 7.0.1.9
    --------           --------------------
    Windows            U200337
    AIX                U849391
    HP-UX (PA-RISC)    U849723
    HP-UX (Itanium)    U849728
    Solaris (SPARC)    U849724
    Solaris (x86-64)   U849730
    iSeries            7.0.1.9
    Linux (x86)        U849725
    Linux (x86-64)     U849729
    Linux (zSeries)    U849726
    Linux (Power)      U849727
    
                       v7.1
    Platform           Fix Pack 7.1.0.2
    --------           --------------------
    Windows            7.1.0.2
    AIX                7.1.0.2
    HP-UX (Itanium)    7.1.0.2
    Solaris (SPARC)    7.1.0.2
    Solaris (x86-64)   7.1.0.2
    iSeries            7.1.0.2
    Linux (x86)        7.1.0.2
    Linux (x86-64)     7.1.0.2
    Linux (zSeries)    7.1.0.2
    Linux (Power)      7.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

    IV15695

  • Reported component name

    WMQ AIX V7

  • Reported component ID

    5724H7221

  • Reported release

    701

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-02-15

  • Closed date

    2012-02-28

  • Last modified date

    2012-04-25

  • 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

    WMQ AIX V7

  • Fixed component ID

    5724H7221

Applicable component levels

  • R701 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSDEZSF","label":"IBM WebSphere MQ Managed File Transfer for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
31 March 2023