IBM Support

PI95165: JAVA.LANG.ILLEGALSTATEEXCEPTION CAN OCCUR WHEN AN UPDATED CDI APPLICATION IS REPUBLISHED TO WAS

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

  • A CDI application is successfully running on WAS.  If the
    application is updated and republished to WAS, the following
    error may occur...
    
    java.rmi.RemoteException: ; nested exception is:
    java.lang.IllegalStateException: Managed Class
    {com.test.hello.world.service.HelloWorldService} does not match
    BeanClass {com.test.hello.world.service.HelloWorldService}
     at
    com.ibm.ws.cdi.impl.managedobject.CDIEJBManagedObjectFactoryImpl
    .getBean(CDIEJBManagedObjectFactoryImpl.java:118)
     at
    com.ibm.ws.cdi.impl.managedobject.CDIEJBManagedObjectFactoryImpl
    .createContext(CDIEJBManagedObjectFactoryImpl.java:78)
     at
    com.ibm.ejs.container.ManagedBeanOBase.createInterceptorsAndInst
    ance(ManagedBeanOBase.java:191)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server that update CDI application files    *
    *                  using the Administrative console or the     *
    *                  wsadmin utility.                            *
    ****************************************************************
    * PROBLEM DESCRIPTION: Web modules that require                *
    *                      Context and Dependency Injection        *
    *                      (CDI) fail with IllegalStateException   *
    *                      when restarting after update.           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Typically, if a JavaEE application is running while it is
    updated via the console or wsadmin, WebSphere Application
    Server (WAS) automatically stops the application or its
    effected web modules, updates the application files, and then
    restarts the application or the modules.
    If a CDI application is updated while it is running, the
    application server may fail to restart an effected web module
    and report the following exception.
    java.rmi.RemoteException: ; nested exception is:
    java.lang.IllegalStateException: Managed Class
    {com.test.hello.world.service.HelloWorldService} does not match
    BeanClass {com.test.hello.world.service.HelloWorldService}
    at
    com.ibm.ws.cdi.impl.managedobject.CDIEJBManagedObjectFactoryImpl
    .getBean(CDIEJBManagedObjectFactoryImpl.java:118)
    at
    com.ibm.ws.cdi.impl.managedobject.CDIEJBManagedObjectFactoryImpl
    .createContext(CDIEJBManagedObjectFactoryImpl.java:78)
    at
    com.ibm.ejs.container.ManagedBeanOBase.createInterceptorsAndInst
    ance(ManagedBeanOBase.java:191)
    In WAS v9.0, CDI applications must be restarted after
    updating application files. The failure occurs whenever
    whenever WAS restarts the effected module rather than the
    application.
    

Problem conclusion

  • Apply APAR PI95165 to enable WAS to restart CDI applications
    rather than the effected modules when using the console or
    wsadmin to update applications.
    
    APAR PI95165 supplements APAR PI86396, which enables WAS to
    restart CDI applications rather than the effected modules
    when
    using Hot Deployment with Dynamic Reloading to update
    applications.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 9.0.0.12.  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

    PI95165

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-03-14

  • Closed date

    2019-03-05

  • Last modified date

    2019-03-05

  • 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



Document information

More support for: WebSphere Application Server
General

Software version: 900

Reference #: PI95165

Modified date: 05 March 2019