IBM Support

PI24783: SETTING CLASSLOADER DELEGATION MODE TO PARENTLAST CAN RESULT IN JNDI LOOKUP FAILURES

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Following error is seen
    
    [err] javax.naming.NoInitialContextException: The calling code's
    BundleContext could not be determined.
    [err]  at
    org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitia
    lContext
    (OSGiInitialContextFactoryBuilder.java:46)
    [err]  at
    javax.naming.spi.NamingManager.getInitialContext(NamingManager.j
    ava:695)
    [err]  at
    javax.naming.InitialContext.getDefaultInitCtx(InitialContext.jav
    a:318)
    [err]  at
    javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContex
    t.java:3
    46)
    [err]  at
    javax.naming.InitialContext.listBindings(InitialContext.java:477
    )
    [err]  at test.JNDITest$1.call(JNDITest.java:46)
    [err]  at test.JNDITest$1.call(JNDITest.java:1)
    [err]  at
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:34
    5)
    [err]  at
    java.util.concurrent.FutureTask.run(FutureTask.java:177)
    [err]  at
    java.util.concurrent.Executors$RunnableAdapter.call(Executors.ja
    va:482)
    [err]  at
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:34
    5)
    [err]  at
    java.util.concurrent.FutureTask.run(FutureTask.java:177)
    [err]  at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExec
    utor.jav
    a:1121)
    [err]  at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe
    cutor.ja
    va:614)
    [err]  at java.lang.Thread.run(Thread.java:779)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: JNDI lookup from app with parentLast    *
    *                      delegation results in                   *
    *                      NoInitialContextException               *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    JNDI code relies on the classloader hierarchy to be available,
    but the parentLast classloader was hiding the hierarchy.
    

Problem conclusion

  • We now set the parent classloader on the parentLast class
    loader, creating a valid class loader hierarchy.  The fix for
    this APAR is currently targeted for inclusion in fix pack
    8.5.5.4.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • Avoid using the parentLast delegation setting for the class
    loader if possible.
    

Comments

APAR Information

  • APAR number

    PI24783

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-08-28

  • Closed date

    2014-09-17

  • Last modified date

    2014-09-17

  • 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

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

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

Document Information

Modified date:
28 April 2022