IBM Support

IV93924: Clarify error reported on JMSObjectMessage.toString() when object not in whitelist

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • If whitelisting is enabled and the class of the object contained
    within the body of a JMSObjectMessage is not included in the
    whitelist, then calling:
    
     - Either Message.toString() when the message is of type
    JMSObjectMessage.
     - Or JMSObjectMessage.toString().
    
    returns a string ending with the following exception:
    
    "An exception occurred deserializing a message, exception:
    'java.io.InvalidClassException'."
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of:
    
    - The WebSphere MQ V7.1 classes for JMS.
    - The WebSphere MQ V7.5 classes for JMS.
    - The IBM MQ V8.0 classes for JMS.
    - The IBM MQ V9.0 classes for JMS.
    
    - The WebSphere Application Server V8.5 WebSphere MQ messaging
    provider.
    - The WebSphere Application Server V9.0 IBM MQ messaging
    provider.
    
    who have enabled whitelisting, and have applications that call
    the methods:
    
    - Message.toString() on a message where Message is an instance
    of JMSObjectMessage.
    - JMSObjectMessage.toString().
    
    
    
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When calling one of the methods shown below:
    
    - JMSObjectMessage.toString().
    - Message.toString(), where the Message object is a type of
    JMSObjectMessage.
    
    a string is returned containing a textual representation of the
    Message.
    
    If whitelisting was enabled and the class of the object
    contained within the body of a JMSObjectMessage was not included
    in the whitelist then an Exception would be included in this
    string. An example of this is shown below:
    
      JMSMessage class: jms_object
      JMSType:          null
      JMSDeliveryMode:  2
      JMSDeliveryDelay: 0
      JMSDeliveryTime:  0
      JMSExpiration:    0
      JMSPriority:      4
      JMSMessageID:
    ID:414d5120514d38303035202020202020c2c2b25924035002
      JMSTimestamp:     1505824953690
      JMSCorrelationID: null
      JMSDestination:   queue:///TESTQUEUE
      JMSReplyTo:       null
      JMSRedelivered:   false
        JMSXAppID: MyApp
        JMSXDeliveryCount: 1
        JMSXUserID: myUser
        JMS_IBM_Character_Set: UTF-8
        JMS_IBM_Encoding: 273
        JMS_IBM_Format:
        JMS_IBM_MsgType: 8
        JMS_IBM_PutApplType: 28
        JMS_IBM_PutDate: 20170919
        JMS_IBM_PutTime: 12423370
    An exception occurred deserializing a message, exception:
    'java.io.InvalidClassException'.
    
    Note that the java.io.InvalidClassException is caught internally
    by the IBM MQ classes for JMS and not rethrown to the
    application. However, the message is misleading and does not
    give any information about why the JMSObjectMessage could not be
    represented as a string.
    

Problem conclusion

  • The MQ classes for JMS have been updated so that if the methods:
    
    - JMSObjectMessage.toString().
    - Message.toString(), where the Message object is a type of
    JMSObjectMessage.
    
    are called on a Message where the class of the object is not
    included in the whitelist, then the string representation of the
    Message will contain an informational message indicating why the
    message body could not be shown. Here is an example of this:
    
    JMSMessage class: jms_object
      JMSType:          null
      JMSDeliveryMode:  2
      JMSDeliveryDelay: 0
      JMSDeliveryTime:  0
      JMSExpiration:    0
      JMSPriority:      4
      JMSMessageID:
    ID:414d5120514d38303035202020202020c2c2b25924035a02
      JMSTimestamp:     1505832466041
      JMSCorrelationID: null
      JMSDestination:   queue:///TESTQUEUE
      JMSReplyTo:       null
      JMSRedelivered:   false
        JMSXAppID: MyApp
        JMSXDeliveryCount: 1
        JMSXUserID: myUser
        JMS_IBM_Character_Set: UTF-8
        JMS_IBM_Encoding: 273
        JMS_IBM_Format:
        JMS_IBM_MsgType: 8
        JMS_IBM_PutApplType: 28
        JMS_IBM_PutDate: 20170919
        JMS_IBM_PutTime: 14474605
    MyBadSerializableClass; The class may not be serialized or
    deserialized as it has not been included in the whitelist
    'MyOKSerializableClass'.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v7.5       7.5.0.9
    v8.0       8.0.0.9
    v9.0 CD    9.0.5
    v9.0 LTS   9.0.0.3
    
    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

    IV93924

  • Reported component name

    WMQ LIN X86-64

  • Reported component ID

    5724H7230

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-03-02

  • Closed date

    2017-11-23

  • Last modified date

    2017-11-27

  • 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 LIN X86-64

  • Fixed component ID

    5724H7230

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCPQ63","label":"APAR \/ Maintenance"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
27 April 2020