IBM Support

IT44499: MQ JAVA/JMS trace fails due to java.lang.NumberFormatException

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

  • When an MQ Java/JMS client is embedded in Oracle, Java/JMS trace
    fails to generate due to java.lang.NumberFormatException.
    
    The following exception stack can be observed:
    
    09:29:44 [1692800984894] [Root Thread] java.lang.Class static()
    java.lang.NumberFormatException caught: For input string:
    "(PID=57324;SID=1185)"
           at
    java.lang.NumberFormatException.forInputString(NumberFormatExcep
    tion.java:65)
           at java.lang.Integer.parseInt(Integer.java:569)
           at java.lang.Integer.parseInt(Integer.java:615)
           at
    com.ibm.msg.client.commonservices.j2se.trace.DefaultTracer.gener
    atePID(DefaultTracer.java:1185)
           at
    com.ibm.msg.client.commonservices.j2se.trace.DefaultTracer.getAp
    propriateHandler(DefaultTracer.java:917)
           at
    com.ibm.msg.client.commonservices.j2se.trace.DefaultTracer.initi
    alize(DefaultTracer.java:773)
           at
    com.ibm.msg.client.commonservices.trace.Trace.setOn(Trace.java:6
    04)
           at
    com.ibm.msg.client.commonservices.trace.Trace.initialize(Trace.j
    ava:2591)
           at
    com.ibm.msg.client.commonservices.CommonServices.<clinit>(Common
    Services.java:128)
           at
    com.ibm.msg.client.commonservices.propertystore.PropertyStore.in
    itialize(PropertyStore.java:551)
           at
    com.ibm.msg.client.commonservices.propertystore.PropertyStore.<c
    linit>(PropertyStore.java:256)
           at
    com.ibm.msg.client.commonservices.trace.Trace.<clinit>(Trace.jav
    a:555)
           at
    com.ibm.mq.jmqi.JmqiObject.<clinit>(JmqiObject.java:35)
           at
    com.gltrade.rims.mq.RIMSmqToolsOut.mqWrite(RIMSmqToolsOut.java:1
    68)
           at
    com.gltrade.rims.mq.RIMSmqOut.mqSend(RIMSmqOut.java:150)
           ...
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    Users of the MQ classes for Java/JMS with the MQ Trace enabled.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    Having a MQ Classes for Java/JMS application with trace enabled
    and running embedded in Oracle database will fail on the attempt
    to obtain the JVM Process ID via a call to
    "ManagementFactory.getRuntimeMXBean().getName()".  The value
    returned by this call is not in the expected format and when it
    is attempt to be converted to a integer value results in a
    java.lang.NumberFormatException.  This is due to the method call
    return a string having the following content
    "(PID=57324;SID=1185)@hostname", rather than the expected value
    "57324@hostname".
    
    The following exception stack can be observed:
    
    09:29:44 [1692800984894] [Root Thread] java.lang.Class static()
    java.lang.NumberFormatException caught: For input string:
    "(PID=57324;SID=1185)"
           at
    java.lang.NumberFormatException.forInputString(NumberFormatExcep
    tion.java:65)
           at java.lang.Integer.parseInt(Integer.java:569)
           at java.lang.Integer.parseInt(Integer.java:615)
           at
    com.ibm.msg.client.commonservices.j2se.trace.DefaultTracer.gener
    atePID(DefaultTracer.java:1185)
           at
    com.ibm.msg.client.commonservices.j2se.trace.DefaultTracer.getAp
    propriateHandler(DefaultTracer.java:917)
           at
    com.ibm.msg.client.commonservices.j2se.trace.DefaultTracer.initi
    alize(DefaultTracer.java:773)
           at
    com.ibm.msg.client.commonservices.trace.Trace.setOn(Trace.java:6
    04)
           at
    com.ibm.msg.client.commonservices.trace.Trace.initialize(Trace.j
    ava:2591)
           at
    com.ibm.msg.client.commonservices.CommonServices.<clinit>(Common
    Services.java:128)
           at
    com.ibm.msg.client.commonservices.propertystore.PropertyStore.in
    itialize(PropertyStore.java:551)
           at
    com.ibm.msg.client.commonservices.propertystore.PropertyStore.<c
    linit>(PropertyStore.java:256)
           at
    com.ibm.msg.client.commonservices.trace.Trace.<clinit>(Trace.jav
    a:555)
           at
    com.ibm.mq.jmqi.JmqiObject.<clinit>(JmqiObject.java:35)
           ...
    

Problem conclusion

  • The source code has been updated to capture the
    NumberFormatException and avoid the application failing.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.3 LTS   9.3.0.15
    v9.x CD    9.3.5
    
    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

    IT44499

  • Reported component name

    MQ BASE V9.3

  • Reported component ID

    5724H7291

  • Reported release

    930

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2023-09-11

  • Closed date

    2023-10-23

  • Last modified date

    2023-10-23

  • 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.3

  • Fixed component ID

    5724H7291

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":"9.3","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
24 October 2023