IBM Support

PI98177: PACKAGE OBJECTS NOT AVAILABLE FROM ARCHIVE CLASS LOADERS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The classloader for the resource adapter is not working
    correctly and is returning null for any Class.getPackage().
    
    When a resource adapter is installed on WebSphere Application
    Server, and inside this resource adapter classes (loaded using
    resource adapter classloader), if you have a code
    SomeClass.class.getPackage().getName(), it will crash in
    NullPointerException because getPackage() will return null.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server                                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: NullPointerException when installing    *
    *                      resource adapter.                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When installing a resource adapter, a NullPointerException
    will occur if resource adapter code attempts to use a
    package object for a resource adapter or resource adapter
    related class.
    For example:
    Caused by: java.lang.NullPointerException
    at
    org.jboss.logging.LoggerProviders.logProvider(LoggerProviders.ja
    va:156)
    at
    org.jboss.logging.LoggerProviders.tryJDK(LoggerProviders.java:11
    2)
    at
    org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.j
    ava:107)
    at
    org.jboss.logging.LoggerProviders.find(LoggerProviders.java:34)
    at
    org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:
    31)
    at
    java.lang.J9VMInternals.ensureError(J9VMInternals.java:141)
    at
    java.lang.J9VMInternals.recordInitializationFailure(J9VMInternal
    s.java:130)
    at org.jboss.logging.Logger.getLogger(Logger.java:2465)
    at org.jboss.logging.Logger.getLogger(Logger.java:2490)
    at
    org.apache.activemq.artemis.ra.ActiveMQResourceAdapter.<clinit>(
    ActiveMQResourceAdapter.java:71)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCons
    tructorAccessorImpl.java:88)
    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delega
    tingConstructorAccessorImpl.java:57)
    at
    java.lang.reflect.Constructor.newInstance(Constructor.java:437)
    at
    com.ibm.ws.management.application.J2CAppUtils$1.run(J2CAppUtils.
    java:416)
    at
    com.ibm.ws.security.util.AccessController.doPrivileged(AccessCon
    troller.java:118)
    at
    com.ibm.ws.management.application.J2CAppUtils.getDefinedProperti
    es(J2CAppUtils.java:413)
    at
    com.ibm.ws.management.application.J2CAppUtils.getDefinedProperti
    es(J2CAppUtils.java:543)
    at
    com.ibm.ws.management.component.InstallRAHelper.loadBeanProperty
    WithType(InstallRAHelper.java:253)
    at
    com.ibm.ws.management.component.InstallRAHelper.loadBeanProperty
    (InstallRAHelper.java:242)
    at
    com.ibm.ws.management.component.AdminOperationsMBean.createJ2CPo
    st10ResourceAdapter(AdminOperationsMBean.java:1413)
    at
    com.ibm.ws.management.component.AdminOperationsMBean.createJ2CPo
    st10ResourceAdapter(AdminOperationsMBean.java:1234)
    at
    com.ibm.ws.management.component.AdminOperationsMBean._getResourc
    eAdapterFromRAR(AdminOperationsMBean.java:1086)
    at
    com.ibm.ws.management.component.AdminOperationsMBean.getResource
    AdapterFromRAR(AdminOperationsMBean.java:967)
    This specific case occured from JBOSS logging code.  The JBOSS
    code is attempting to retrieve a fully qualified package
    name for a class loaded in relationship to a resource adapter
    class.
    In this specific case, the preferred alternative solution is to
    modify the JBOSS logging code to obtain the fully qualified
    package name directly from the fully qualified class name.  Use
    of a package object is unnecessary for obtaining the package
    name of a loaded class.
    

Problem conclusion

  • A code update was made, including a new enablement custom
    property.  The code update, when enabled, causes package
    objects to be created when loading application classes.  This
    ensures that a non-null package is available for any loaded
    class.
    
    The new custom property is "com.ibm.ws.wtp.package.loads".
    This new custom property must be set to "true" in the failing
    process to enable the new code.  For simplicity, the new custom
    property can be safely set on all application server and
    deployment manager nodes.
    
    The fix for this APAR is currently targeted for inclusion in
    fix packs 8.5.5.15 and 9.0.0.10.  Please refer to the
    Recommended Updates page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI98177

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-05-21

  • Closed date

    2018-09-07

  • Last modified date

    2018-10-01

  • 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

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022