IBM Support

IT17200: WMQ V7.0.1.12 CLASSES FOR JAVA: BUFFERLENGTH DOUBLED IF MQGMO_CONVERT IS ACTIVE RESULTING IN 2010 ERROR

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • After upgrading to WebSphere MQ V7.0.1.13, when an application
    calls the WebSphere MQ classes for Java method:
    
    MQDestination.get(MQMessage message, MQGetMessageOptions
    getMessageOptions)
    
    without specifying a maximum message length to get a message, if
    the MQGMO_CONVERT option is set then a 2010 error
    (MQRC_DATA_LENGTH_ERROR) can be reported.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of:
    
    - The WebSphere MQ V7.0.1 classes for Java
    - The WebSphere MQ V7.1 classes for Java
    - The WebSphere MQ V7.5 classes for Java
    - The IBM MQ V8.0.0 classes for Java
    - The IBM MQ V9.0.0 classes for Java
    
    who have applications that:
    
    - Connect to a queue manager using the CLIENT transport.
    - Construct an MQMessage object and call the method
    MQMessage.resizeBuffer(int size) on that object.
    - And construct an MQGetMessageOptions object that has the
    MQGMO_CONVERT option specified.
    - And call one of the methods shown below:
    
    MQDestination.get(MQMessage message)
    MQDestination.get(MQMessage message, MQGetMessageOptions
    getMessageOptions)
    
    to get a message from either a queue or a topic, passing in the
    MQMessage and MQGetMessageOptions objects that were created
    earlier.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When using the MQ classes for Java, every MQMessage object used
    by an application has an internal buffer associated with it.
    This buffer is used to store the message data. The size of the
    buffer is usually managed by the WebSphere MQ classes for Java.
    However, applications can choose to specify the buffer size by
    calling the method:
    
    - MQMessage.resizeBuffer(int size)
    
    If this method is called on an MQMessage object to set the size
    of the internal buffer, and that object is subsequently passed
    into the either of the two methods shown below:
    
    - MQDestination.get(MQMessage message)
    - MQDestination.get(MQMessage message, MQGetMessageOptions
    getMessageOptions)
    
    then the MQ classes for Java will pass that internal buffer to
    the queue manager as part of an MQGET API call. If the message
    data is larger than the buffer, the MQ classes for Java will
    increase the size of the buffer to ensure that the message data
    fits and then issue a new MQGET API call..
    
    APAR IT01374 changed the behaviour of the WebSphere MQ classes
    for Java, so that if:
    
    - An application called one of the methods shown above to get a
    message, specifying an MQGetMessageOptions object that had the
    MQGMO_CONVERT option set
    - And the internal buffer was not large enough to hold the
    converted message
    
    then the internal buffer size was increased to be:
    
    2 * the length of the unconverted message data
    
    A new MQGET API call was then issued with this larger buffer.
    As a result of this change, if the larger buffer was now greater
    than the attribute MAXMSGL on the channel that the application
    was using to connect to the queue manager, the methods:
    
    - MQDestination.get(MQMessage message)
    - MQDestination.get(MQMessage message, MQGetMessageOptions
    getMessageOptions)
    
    would throw an MQException containing MQ reason code 2010
    (MQRC_DATA_LENGTH_ERROR). This prevented the application from
    receiving any messages which:
    
    - Had a size which was more than half the value of MAXMSGL.
    - And contained data that did not need to be converted.
    

Problem conclusion

  • The MQ classes for Java have been updated so that if an
    application calls either of the two methods shown below:
    
    - MQDestination.get(MQMessage message)
    - MQDestination.get(MQMessage message, MQGetMessageOptions
    getMessageOptions)
    
    to get a message that has a size which is more that half the
    value of MAXMSGL and contains data that does not need to be
    converted, the internal buffer passed to the queue manager as
    part of the MQGET API call is managed correctly. This allows
    that message to be passed back to the application.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v7.0       7.0.1.15
    v7.1       7.1.0.9
    v7.5       7.5.0.8
    v8.0       8.0.0.7
    v9.0 CD    9.0.3
    v9.0 LTS   9.0.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

    IT17200

  • Reported component name

    WMQ WINDOWS V7

  • Reported component ID

    5724H7220

  • Reported release

    701

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-09-23

  • Closed date

    2017-04-18

  • Last modified date

    2017-04-18

  • 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 WINDOWS V7

  • Fixed component ID

    5724H7220

Applicable component levels

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

Document Information

Modified date:
31 March 2023