IBM Support

IT25496: IBM MQ classes for JMS reports an unhelpful Java Exception when failing to interpret a received message

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 is using the IBM MQ classes for JMS v8.0.0.8, and
    is consuming a message from a queue.
    
    The message being consumed declares the message body to be
    encoded as:
    
      Format:  MQSTR
      Encoding: 0x222
      CCSID: 1200
    
    When the application makes the method call to consume the
    message from the queue:
    
      javax.jms.MessageConsumer.receive(long)
    
    the application receives an exception to indicate that the
    message was not able to be backed out due to no dead letter
    queue being defined, of the form:
    
    com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ0032: There
    is no dead letter queue defined.
    WebSphere MQ classes for JMS attempted to put a poisonous
    message to the dead letter queue because it could not be routed
    to the backout retry queue. This failed because there was no
    dead letter queue defined to the queue manager.
    Define a dead letter queue.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0
    at sun.reflect.NativeConstructorAccessorImpl.newInstance
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
    at java.lang.reflect.Constructor.newInstance
    at
    com.ibm.msg.client.commonservices.j2se.NLSServices.createExcepti
    on
    at
    com.ibm.msg.client.commonservices.nls.NLSServices.createExceptio
    n
    at com.ibm.msg.client.wmq.internal.WMQPoison.deadletter
    at com.ibm.msg.client.wmq.internal.WMQPoison.handlePoisonMessage
    at com.ibm.msg.client.wmq.internal.WMQPoison.handlePoisonMessage
    at com.ibm.msg.client.wmq.internal.WMQPoison.handlePoisonMessage
    at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg
    at
    com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt
    ernal
    at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive
    at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive
    at
    com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn
    boundMessage
    at
    com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive
    at com.ibm.mq.jms.MQMessageConsumer.receive
    at MyApplication.MyMethod
    
    
    In addition, a log file has been generated (mqjms.log.0), which
    contains the exception:
    
    July 3, 2018 4:16:44 PM BST[main]
    com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow
    Error processing message '0000:  3c00 6100 7000 7000 6c00 6500
    3e00 0000    <.a.p.p.l.e.>...
    ... ... ...
    Message : java.lang.Exception
      Class : class java.lang.Exception
      Stack :
    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.receive
            : com.ibm.mq.jms.MQMessageConsumer.receive
            : MyApplication.MyMethod
    
    This "java.lang.Exception" gives no indication as to what the
    problem was with the message which triggered the poison message
    handling routines.
    

Local fix

  • Roll back to fix pack 8.0.0.6 or earlier, or apply fix pack
    8.0.0.10 or later, which addresses the problem via APAR IT17612.
    
    Alternatively, configure the message producing application to
    send the message body encoded in an alternative CCSID to 1200,
    such as1208 (UTF-8).
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This problem affects users of applications which are using the
    IBM MQ classes for JMS on all platforms, when attempting to
    consume a JMS message which contains an encoded data structure
    which the IBM MQ classes for JMS cannot process.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When a IBM MQ classes for JMS application attempts to consume a
    message from an IBM MQ queue manager, for example by using the
    JMS method call:
    
      javax.jms.MessageConsumer.receive(long timeout)
    
    the message is returned from the queue manager as a series of
    bytes, which the IBM MQ classes for JMS must then interpret.
    
    
    If there is a problem with the interpretation of character data
    within the message byte sequence, depending upon the
    configuration the IBM MQ classes for JMS may attempt to send the
    message back to the IBM MQ queue manager, to either the backout
    queue ('BOQNAME') or the dead letter queue.
    
    This is a silent operation (unless the sending of the message to
    the backout queue / dead letter queue also fails), meaning the
    application thread is not aware that the move has occurred.  The
    method:
    
      javax.jms.MessageConsumer.receive(long timeout)
    
    will either return another message on the queue, or a 'null'
    value if no other message are available within the timeout
    period.
    
    
    In order to let the user know that a problem occurred
    interpreting the original message, a error message is written to
    the JMS log ('mqjms.log.0').  This contains information about
    the message being consumed, and also provides an exception
    message which is intended to provide information about the cause
    of the problem encountered while interpreting the message.
    
    However, the exception stack reported was of the form:
    
    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
    ' with MQMD 'version:2(0x2) report:0(0x0) msgType:8(0x8)
    expiry:-1(0xffffffff) feedback:0(0x0) encoding:546(0x222)
    codedCharSetId:1200(0x4b0) format:'MQSTR   ' priority:0(0x0)
    persistence:0(0x0)
    msgId:414D51206170706C65514D2020202020673BFC590E560020
    correlId:000000000000000000000000000000000000000000000000
    backoutCount:0(0x0) replyToQ:'
                                                   '
    replyToQMgr:'myQMGR                                          '
    userIdentifier:'mqm         '
    accountingToken:000000000000000000000000000000000000000000000000
    0000000000000000 applIdentityData:'
                                   ' putApplType:28(0x1c)
    putApplName:'CompleteCcsid1200JmsTester  ' putDate:'20171106'
    putTime:'10412870' applOriginData:'    '
    groupId:000000000000000000000000000000000000000000000000
    msgSeqNumber:1(0x1) physicalMsgOffset:0(0x0) msgFlags:0(0x0)
    originalLength:-1(0xffffffff) '
    
    
    This "java.lang.Exception" provided very little useful
    information as to the cause of the problem, for either the
    application owner to interpret or IBM support.
    

Problem conclusion

  • The IBM MQ classes for JMS has been updated such that the
    underlying exception is now reported in the JMS log file.
    
    In the case where the IBM MQ classes for JMS was unable to
    interpret a CCSID 1200 encoded message, the data written into
    the log file is now of the form:
    
    Message : com.ibm.msg.client.jms.DetailedJMSException:
    JMSCMQ1046: The character set 'ccsid:1200' is not supported.
    An attempt was made to send or receive a map message, stream
    message or text message whose body is encoded using a character
    set not supported by the JVM. In the case of text messages, this
    exception might be thrown when the body of the message is first
    queried, rather than at receive time.
    Only encode a message using a character set known to be
    available to the receiving application.
    
    class com.ibm.msg.client.jms.DetailedJMSException
    sun.reflect.NativeConstructorAccessorImpl.newInstance0
    sun.reflect.NativeConstructorAccessorImpl.newInstance
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance
    java.lang.reflect.Constructor.newInstance
    com.ibm.msg.client.commonservices.j2se.NLSServices.createExcepti
    on
    com.ibm.msg.client.commonservices.nls.NLSServices.createExceptio
    n
    com.ibm.msg.client.wmq.common.internal.WMQUtils.getCodepage
    com.ibm.msg.client.wmq.common.internal.messages.WMQReceiveMarsha
    l.addBodyToProviderMessage
    com.ibm.msg.client.wmq.common.internal.messages.WMQReceiveMarsha
    l.createProviderMessage
    com.ibm.msg.client.wmq.common.internal.messages.WMQReceiveMarsha
    l.exportProviderMessage
    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.receive
    com.ibm.mq.jms.MQMessageConsumer.receive
    MyApplication.myMethod
    
    
    This gives IBM support more useful information on the underlying
    problem which caused the message consume to fail.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v8.0       8.0.0.11
    v9.0 LTS   9.0.0.6
    v9.1 CD    9.1.1
    v9.1 LTS   9.1.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

    IT25496

  • 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

    2018-06-26

  • Closed date

    2018-09-05

  • Last modified date

    2018-09-05

  • 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:
05 September 2018