IBM Support

PI85892: CLASSCASTEXCEPTIONS WHILE DOING A NAMING LOOKUP FOR BEANMANGER.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • ClassCastExceptions while doing a naming lookup for beanManger.
    
    ###
    8/4/17 2:29:32:944 CDT] 000000c5 webapp        E
    com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E:
    [Servlet Error]-[mvc-dispatcher]:
    java.lang.NoClassDefFoundError:
    
    Caused by: java.lang.ClassCastException: javax.naming.Reference
    incompatible with javax.enterprise.inject.spi.BeanManager
    ###
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server                                      *
    *                  who do not use CDI but use a third party    *
    *                  library that uses jndi to access CDI such   *
    *                  as                                          *
    *                  jersey.                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: JNDI is returning a Reference object    *
    *                      instead of throwing a NamingException   *
    *                      when CDI is disabled, resulting in the  *
    *                      following exception:                    *
    *                      java.lang.ClassCastException:           *
    *                      javax.naming.Reference incompatible     *
    *                      with                                    *
    *                      javax.enterprise.inject.spi.BeanManager *
    *                                                              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    An exception was frequently hit during normal operation was
    replaced with a logging message. However this change
    resulted in JNDI returning Reference objects instead of a
    NamingException when looking up a BeanManager while
    CDI is disabled. Third party libraries, such as Jersey, used the
    presence of a NamingException to determine if
    CDI was enabled or disabled. Therefore without the exception
    they incorrectly assumed CDI was enabled, leading
    to exceptions.
    To fix this we reverted the change and re-introduced the
    exceptions.
    

Problem conclusion

  • The fix for this APAR is currently targeted for inclusion in
    fix pack 8.5.5.13.  Please refer to the Recommended Updates
    page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    
    An interim fix is available at https://www-
    945.ibm.com/support/fixcentral/swg/selectFixes?
    parent=ibm%2FWebSphere&product=ibm/WebSphere/WebSphere+Applicati
    on+Server&release=All&platform=All&function=fixId&fixids=8.5.5.1
    2-WS-WASProd-IFPI85892&includeSupersedes=0
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI85892

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-08-14

  • Closed date

    2017-09-26

  • Last modified date

    2017-09-26

  • 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

    WEBSPHERE APP S

  • Fixed component ID

    5724J0800

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:
01 December 2021