IBM Support

PI31579: ILLEGALSTATEEXCEPTION WHEN ACCESSING BEANMANAGER IN JSF SYSTEMEVENTLISTENER FOR PREDESTROYAPPLICATIONEVENT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following IllegalStateException is generated when stopping
    an application:
    
    com.ibm.ws.webcontainer.webapp.WebApp
    notifyServletContextDestroyed
    SRVE0285E: Exception caught while destroying context: {0}
    java.lang.IllegalStateException:
    Unable to find BeanManager. Please ensure that you configured
    the CDI implementation of your choice properly.
    at
    org.apache.deltaspike.core.api.provider.BeanManagerProvider.
    getBeanManager(BeanManagerProvider.java:201)
    
    and the following error is generated in the ffdc log:
    
    Exception stack trace:
    com.ibm.websphere.naming.CannotInstantiateObjectException:
    Exception occurred while the JNDI NamingManager was processing a
    javax.naming.Reference object. [Root exception is
    javax.enterprise.inject.UnsatisfiedResolutionException: The
    xxxxx.war module in the xxxxx-ear application is not CDI
    enabled. The CDI BeanManager is not available for applications
    that are not CDI enabled.]
    at com.ibm.ws.naming.util.Helpers.
    processSerializedObjectForLookupE xt(Helpers.java:1103)
    at com.ibm.ws.naming.urlbase.UrlContextHelper.
    processBoundObjectFor Lookup(UrlContextHelper.java:181)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server users of   *
    *                  Context and Dependency Injection (CDI)      *
    ****************************************************************
    * PROBLEM DESCRIPTION: IllegalStateException occurs when       *
    *                      stopping an application that uses       *
    *                      Context and Dependency Injection (CDI)  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The application attempts to access the CDI BeanManager when
    processing a PreDestroyApplicationEvent in a JSF
    SystemEventListener during stopping of an application. This
    results in an IllegalStateException because the CDI component
    has already begun shutdown and the BeanManager is not
    available.
    Apache DeltaSpike contains such a usage scenario.
    

Problem conclusion

  • The fix provided for this APAR is to delay shutdown of the CDI
    component when the application is stopping until after the JSF
    listener has been invoked.
    
    The fix for this APAR is currently targeted for inclusion in
    fix packs 8.0.0.12 and 8.5.5.9.  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

    PI31579

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2014-12-15

  • Closed date

    2015-10-07

  • Last modified date

    2015-10-07

  • 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

  • R800 PSY

       UP

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

Document Information

Modified date:
27 April 2022