IBM Support

IT31900: MQ Classes for JMS application unable to consume a JMS MapMessage containing Unicode escape sequences

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 using the MQ classes for JMS sends a JMS
    javax.jms.MapMessage to a queue, where the message data contains
    the character:
    
    Unicode character name:  KISSING FACE (U+1F617)
    UTF-16: d8 3d de 17
    UTF-8: f0 9f 98 97
    
    When the application attempts to consume the message using the
    method call:
    
      javax.jms.MessageConsumer.receiveNoWait()
    
    the message is not returned to the application, and is no longer
    on the queue.  Instead, it has been moved to the queue manager's
    defined dead letter queue.
    
    A 'mqjms.log.0' file has been created, and reports the following
    exception stack:
    
    class java.lang.Exception
    com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg
    com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt
    ernal
    com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive
    com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive
    com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn
    boundMessage
    com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveNo
    Wait
    com.ibm.mq.jms.MQMessageConsumer.receiveNoWait
    myApplication.myMethod
    
    along with the message:
    
    20 February 2020 09:47:46 GMT[main]
    com.ibm.msg.client.wmq.internal.WMQPoison
    Message '414D51206170706C65514D20202020201915DC5D046EE92F',
    which was on the queue 'MYQ' has been moved to the dead letter
    queue on queue manager 'MYQMGR'
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    Users of the IBM MQ classes for JMS API, who are receiving
    messages which contain Unicode escape sequence character strings
    for characters which are surrogate pairs when encoded in UTF-16.
    
    An example of this is when sending JMS MapMessages which contain
    surrogate pair characters in their data fields.  A surrogate
    pair character is one which is outside of the Unicode Basic
    Multilingual Plane (BMP), U+0000 -> U+FFFF, in the range U+10000
    -> U+10FFFF.
    
    Examples of such characters include Emoji type characters for
    example:
    
      KISSING FACE (U+1F617)
      OLD KEY (U+1F5DD)
      SMILING FACE WITH HALO (U+1F607)
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When the IBM MQ classes for JMS send a "javax.jms.MapMessage"
    class of message to a queue, the data is stored in an XML-like
    structure within the message body.
    
    As part of creating this XML-like structure, any characters in
    the MapMessage's data which would conflict with XML characters,
    are escaped with a character sequence.
    For example:
    
      '>' --> ">"
      '<' --> "<"
      ... etc.
    
    As part of this transformation, any characters which are
    detected to be in the UTF-16 surrogate pair range are also
    transformed into a Unicode escape sequence.
    For example, for the character:
    
      KISSING FACE (U+1F617)
    
    which is represented in UTF-16 as the 4 byte sequence: "d83d
    de17", is encoded as the character sequence:
    
      "&#x1f617;"
    
    
    The problem was that when a message was being consumed using the
    IBM MQ classes for JMS, the code which reversed this
    transformation recognised the '&' character as the start of an
    escape sequence, but did not recognise the following ''#xhhhhh;"
    sequence as being a Unicode representation of a character.
    
    This resulted in the message consume operation failing to decode
    the MQ message back into a JMS MapMessage, and the message being
    treated as a poison message, resulting it in being moved to the
    backout queue or dead letter queue if the queue manager had been
    configured with such a queue.
    

Problem conclusion

  • The IBM MQ classes for JMS has been updated such that the
    escaped Unicode encoded character now recognises and transforms
    the escaped Unicode sequence back into its corresponding
    character.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v8.0       8.0.0.15
    v9.0 LTS   9.0.0.10
    v9.1 CD    TBC.
    v9.1 LTS   9.1.0.6
    
    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

    IT31900

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7251

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-02-18

  • Closed date

    2020-02-28

  • Last modified date

    2020-02-28

  • 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

    5724H7251

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":"8.0.0.0","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
27 March 2020