IBM Support

IT40928: Unable to put a message to a queue when using a CCSID 943 JVM using the MQ classes for Java

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 running on a Japanese locale AIX system is using
    the MQ classes for Java to get a message from one queue, and put
    the message to another queue.  The application is connected to
    the queue manager using the BINDINGS mode transport.
    
    The application successfully gets the message from the first
    queue by issuing the method:
    
      com.ibm.mq.MQQueue.get(MQMessage,MQGetMessageOptions)
    
    However, when the application attempts to put the received
    message to a second queue, using the method:
    
      com.ibm.mq.MQQueue.put(MQMessage,MQPutMessageOptions)
    
    the MQ classes for Java returns an exception to the application,
    and the MQPUT operation fails.  The exception is of the form:
    
    com.ibm.mq.MQException: MQJE001: ????? '2'??? '2330'?
    at
    com.ibm.mq.MQDestination.internalMQPUT(MQDestination.java:1384)
    at com.ibm.mq.MQDestination.put(MQDestination.java:1234)
    at myApplication.myMethod(...)
    Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2330;AMQ6047:
    ??????????????? [1=java.lang.String,2=943(x-IBM943) Unmappable
    Action: REPORT, Unmappable Replacement: 63, spaceByte: 32]
    at com.ibm.mq.jmqi.internal.JmqiDC.writeFieldDC(JmqiDC.java:570)
    at com.ibm.mq.jmqi.internal.JmqiDC.writeField(JmqiDC.java:676)
    at com.ibm.mq.jmqi.internal.JmqiDC.writeField(JmqiDC.java:642)
    at com.ibm.mq.jmqi.MQMD.writeToBuffer(MQMD.java:1202)
    at com.ibm.mq.jmqi.MQMD.writeToBuffer(MQMD.java:1075)
    at com.ibm.mq.jmqi.local.LocalMQ.MQPUT(LocalMQ.java:4392)
    at
    com.ibm.mq.jmqi.monitoring.JmqiInterceptAdapter.MQPUT(JmqiInterc
    eptAdapter.java:555)
    at com.ibm.mq.ese.jmqi.ESEJMQI.MQPUT(ESEJMQI.java:484)
    at
    com.ibm.mq.MQDestination.internalMQPUT(MQDestination.java:1377)
    
    
    MQRC 2330 corresponds to the reason code:
    MQRC_CODED_CHAR_SET_ID_ERROR
    
    This problem started to occur after migrating the MQ
    installation to 9.2.  The issue was not seen with the previous
    MQ 9.1 installation, where the message was successfully consumed
    from one queue and put to another.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the MQ classes for Java/JMS who are
    interacting with messages that contain character data which is
    to be encoded in CCSID 943 (Shift-JIS).
    
    This includes the components of MQ which utilise the underlying
    technology used by these APIs, which includes:
    
    MQ Managed File Transfer
    MQ Explorer
    MQ Telemetry service
    MQ Resource Adapter
    MQ AMQP service
    MQ Rest API
    MQ Console
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When character encoding/decoding is required to be used by the
    MQ Java components, functionality is employed which maps between
    IBM Coded Character Set Identifier (CCSID) integer values, and
    Java "java.nio.charset.Charset" values.
    
    Beyond a base set of charsets  which all JVMs must support,
    there are numerous other Charsets which vary between different
    JVM vendors, or the same Charset which has different alias
    names.  As a consequence there is not always a clear one-to-one
    mapping between a specific IBM CCSID value and a Java Charset.
    
    One such example is the Japanese CCSID 943 (Shift-JIS).  The IBM
    8.0 JREs contain an alias for the Charset named "943", which is
    an alias name for the Charset with the canonical name:
    
      "x-IBM943"
    
    However, there is a second variant of this Charset which
    provides compatibility with the full range of ASCII characters,
    which is the Charset with the canonical name:
    
      "x-IBM943C"
    
    
    In the ASCII range, there are two characters which are only
    encodable in the second of these Charsets, which are:
    
       '\'    REVERSE SOLIDUS (U+005C)  -->  0x5C
       '~'    TILDE (U+007E)  -->  0x7E
    
    Attempts to encode this backslash character '\' using the Java
    Charset "x-IBM943" will fail.  If the MQ classes for Java
    attempt to do this operation, an error will be reported back to
    the application.  The precise form of the error will depend on
    which operation this encoding or decoding operation has been
    requested on.
    
    
    For example, if an application is using the MQ classes for Java
    v9.2.0.5 to put a message to a queue using the BINDINGS
    transport, on a JVM which is running in a Japanese locale, the
    MQ classes for Java would attempt to encode the character data
    contained within the MQMD using the Java Charset "x-IBM943".
    
    If (for example) the MQMD field:
    
      putApplName
    
    of the message being put contained a backslash character, for
    example the character string:
    
    	"C:\utils\rfhutilc.exe"
    
    then the JVM would be unable to encode this character string
    into bytes using the "x-IBM943" Charset., which resulted in the
    MQPUT operation failing with the reason code:
    
      MQRC 2330 'MQRC_CODED_CHAR_SET_ID_ERROR'
    
    which was returned to the application in the form of a Java
    exception.
    
    
    This issue was not encountered with earlier versions of MQ prior
    to MQ 9.2, because the MQ classes for Java/JMS would use a
    mathematical encoding scheme to encode characters in the ASCII
    range into bytes for this CCSID, in preference to utilising the
    Java Charset class as the mechanism for driving the character
    encoding.
    

Problem conclusion

  • The mapping of the CCSID 943 to a Java Charset has been updated
    to use:
    
      "x-IBM943C"
    
    instead of:
    
      "x-IBM943"
    
    Note that this will prevent the encoding of the following two
    characters, which were present in "x-IBM943" at the same code
    points at the above two characters:
    
      '¥'    YEN SIGN (U+00A5)  -->  5c
      ''    OVERLINE (U+203E)  -->  7e
    
    It is suggested if you wish to use these characters which are
    unavailable in "x-IBM943C", then using an alternative CCSID such
    as 1208 (UTF-8) instead of CCSID 943 is recommended which
    includes mappings for both sets of characters.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.2 LTS   9.2.0.15
    v9.3 LTS   9.3.0.10
    v9.x CD    9.3.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

    IT40928

  • Reported component name

    MQ BASE V9.2

  • Reported component ID

    5724H7281

  • Reported release

    920

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-05-13

  • Closed date

    2023-03-10

  • Last modified date

    2023-03-31

  • 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

    MQ BASE V9.2

  • Fixed component ID

    5724H7281

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"920","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
31 March 2023