IBM Support

IT16007: MQ is incorrectly reading EBCDIC message with IIH & RFH2 headerswhen GMO_CONVERT is used - error MQHDR0011 occurs

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using the MQHeaderIterator class to parse headers contained
    within an MQMessage object, as outlined in the Knowledge Center
    here:
    
    http://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.
    mq.dev.doc/q030890_.htm
    
    a java.lang.RuntimeException, wrapping a
    com.ibm.mq.headers.MQDataException with the MQ reason code 2142
    (MQRC_HEADER_ERROR), could have been thrown to the application
    if the message was consumed with the MQGMO_CONVERT get message
    option.
    
    The following example Java call stack for the exception was
    thrown when attempting to interpret an RFH2 header that followed
    the MQIIH header in the structure:
    
    java.lang.RuntimeException: java.lang.RuntimeException:
    com.ibm.mq.headers.MQDataException: MQJE001: Completion Code
    '1', Reason '2142'.
    	at
    com.ibm.mq.headers.MQHeaderIterator.nextHeader(MQHeaderIterator.
    java:289)
    	at WMQHeaderTester.main(WMQHeaderTester.java:57)
    Caused by: java.lang.RuntimeException:
    com.ibm.mq.headers.MQDataException: MQJE001: Completion Code
    '1', Reason '2142'.
    	at
    com.ibm.mq.headers.DefaultHeaderFactory.decode(MQHeaderRegistry.
    java:421)
    	at
    com.ibm.mq.headers.MQHeaderIterator.nextHeader(MQHeaderIterator.
    java:258)
    	... 1 more
    Caused by: com.ibm.mq.headers.MQDataException: MQJE001:
    Completion Code '1', Reason '2142'.
    	at
    com.ibm.mq.headers.internal.Header.validate(Header.java:736)
    	at
    com.ibm.mq.headers.internal.Header.read(Header.java:1057)
    	at com.ibm.mq.headers.MQRFH2.read(MQRFH2.java:229)
    	at
    com.ibm.mq.headers.DefaultHeaderFactory.decode(MQHeaderRegistry.
    java:404)
    	... 2 more
    Caused by:
    com.ibm.mq.headers.internal.validator.MQHeaderValidationExceptio
    n: MQHDR0011:Header 'MQRFH2' has an invalid value 'êãç?' for
    field 'StrucId'
    	at
    com.ibm.mq.headers.internal.MQCharField$1.validate(MQCharField.j
    ava:180)
    	at
    com.ibm.mq.headers.internal.validator.ChainedValidator.validate(
    ChainedValidator.java:73)
    	at
    com.ibm.mq.headers.internal.validator.ChainedValidator.validate(
    ChainedValidator.java:73)
    	at
    com.ibm.mq.headers.internal.HeaderType.validate(HeaderType.java:
    511)
    	at
    com.ibm.mq.headers.internal.Header.validate(Header.java:729)
    	... 5 more
    
    
    Furthermore, as an example, if the message was encoded using the
    CCSID 500 but the application requested conversion to CCSID 819,
    the value of the CCSID field in the MQMD for the consumed
    message was set to 819 and the headers and application data
    converted appropriately. The value of the CCSID field in the
    MQIIH header in the converted message remained set as 500.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the:
    
      - IBM MQ V8 classes for Java
      - IBM MQ V9 classes for Java
    
    who consume messages that contain an MQIIH header structure and
    use the GMO_CONVERT option on a get or browse operation.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When using the MQHeaderIterator class to parse headers contained
    within an MQMessage object, the MQHeaderIterator used the
    CodedCharSetId and Encoding fields in the header currently be
    processed to parse the following header.  However, as described
    in the MQ Knowledge Center, here:
    
    https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm
    .mq.ref.dev.doc/q096970_.htm
    
    the CodedCharSetIdand Encoding fields in the MQIIH structure
    must not be used to specify the character set and encoding of
    the following header (or application message data).  In
    addition, the queue manager does not update the CCSID and
    Encoding fields in the MQIIH header after conversion has
    occurred.
    
    The classes for Java MQHeaderIterator class incorrectly used the
    CCSID and Encoding fields in the MQIIH header to interpret the
    header that followed.  As such, the header following the MQIIH
    could not be parsed correctly and a
    com.ibm.mq.headers.MQDataException with the MQ reason code 2142
    (MQRC_HEADER_ERROR) was thrown.
    

Problem conclusion

  • The MQ classes for Java have been updated such that the
    MQHeaderIterator parsing logic uses the CCSID and Encoding
    fields specified within the MQ header structure that preceded
    the MQIIH when interpreting the next header (or message data)
    that directly follows the MQIIH.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v8.0       8.0.0.6
    v9.0 CD    9.0.1
    v9.0 LTS   9.0.0.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

    IT16007

  • Reported component name

    WMQ BASE MULTIP

  • Reported component ID

    5724H7251

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-07-06

  • Closed date

    2016-07-25

  • Last modified date

    2017-06-01

  • 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 BASE MULTIP

  • Fixed component ID

    5724H7251

Applicable component levels

  • R800 PSY

       UP

[{"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":"LOB45","label":"Automation"}}]

Document Information

Modified date:
01 June 2017