IBM Support

IT43256: Running a Java application with AMS can result in a NullPointerException if keystore.conf content incomplete

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

  • Using the IBM MQ classes for Java/IBM MQ classes for JMS with
    the AMS feature.  If the keystore.conf contents is not complete
    or incorrect it can result in the application hitting a
    NullPointerException.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the IBM MQ classes for Java & JMS
    with the AMS setup.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    If a Local Queue has been enabled with AMS running a java
    application using the MQ classes for Java/JMS may generate a
    NullPointerException if the keystore.conf content is NOT
    correct:
    
    keystore.conf:
    cms.keystore = /home/bob/.mqs/bobkey
    cms.certificate = Bob_Cert
    
    Causes the following NullPointerException:
    
         Caused by [3] --> Message : java.lang.NullPointerException
                             Class : class
    java.lang.NullPointerException
                             Stack :
    com.ibm.mq.ese.config.KeyStoreConfig.isInvalidKeystorePath(KeySt
    oreConfig.java:558)
                                   :
    com.ibm.mq.ese.config.KeyStoreConfig.validate(KeyStoreConfig.jav
    a:463)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl.readKeystoreConfig(Use
    rMapServiceImpl.java:162)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl$2.run(UserMapServiceIm
    pl.java:285)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl$2.run(UserMapServiceIm
    pl.java:278)
                                   :
    java.security.AccessController.doPrivileged(AccessController.jav
    a:747)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl.getCredentials(UserMap
    ServiceImpl.java:278)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl.getCredentials(UserMap
    ServiceImpl.java:247)
                                   :
    com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.initCrypto(Jmqi
    OpenInterceptorImpl.java:780)
                                   :
    com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.determinePolicy
    (JmqiOpenInterceptorImpl.java:721)
                                   :
    com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.afterOpen(JmqiO
    penInterceptorImpl.java:608)
                                   :
    com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.afterSpiOpen(Jm
    qiOpenInterceptorImpl.java:214)
                                   :
    com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.spiOpen(InterceptedJmqiI
    mpl.java:562)
    
    keystore.conf:
    jks.keystore = /home/bob/.mqs/bobkey
    jks.certificate = Bob_Cert
    
         Caused by [3] --> Message : java.lang.NullPointerException
                             Class : class
    java.lang.NullPointerException
                             Stack :
    com.ibm.mq.ese.config.KeyStoreConfig.isInvalidPrivateKeyPassword
    (KeyStoreConfig.java:533)
                                   :
    com.ibm.mq.ese.config.KeyStoreConfig.validate(KeyStoreConfig.jav
    a:481)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl.readKeystoreConfig(Use
    rMapServiceImpl.java:162)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl$2.run(UserMapServiceIm
    pl.java:285)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl$2.run(UserMapServiceIm
    pl.java:278)
                                   :
    java.security.AccessController.doPrivileged(AccessController.jav
    a:747)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl.getCredentials(UserMap
    ServiceImpl.java:278)
                                   :
    com.ibm.mq.ese.service.UserMapServiceImpl.getCredentials(UserMap
    ServiceImpl.java:247)
                                   :
    com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.initCrypto(Jmqi
    OpenInterceptorImpl.java:780)
                                   :
    com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.determinePolicy
    (JmqiOpenInterceptorImpl.java:721)
                                   :
    com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.afterOpen(JmqiO
    penInterceptorImpl.java:608)
                                   :
    com.ibm.mq.ese.intercept.JmqiOpenInterceptorImpl.afterSpiOpen(Jm
    qiOpenInterceptorImpl.java:214)
                                   :
    com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.spiOpen(InterceptedJmqiI
    mpl.java:562)
    

Problem conclusion

  • The code has been updated to avoid the NullPointerException and
    generate a ConfigException instead.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.2 LTS   9.2.0.11
    v9.x CD    9.2.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

    IT43256

  • 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

    2023-03-01

  • Closed date

    2023-03-17

  • Last modified date

    2023-04-04

  • 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:
04 April 2023