IBM Support

PH05829: MANAGEDOBJECTEXCEPTION WHEN CALLING GETBEAN FOR NONCONTEXT

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

  • If getBean is called for noncontextual beans, the following
    exception occurs:
    
    webapp E com.ibm.ws.webcontainer.webapp.WebApp
    loadLifecycleListeners SRVE0322E: The
    [org.example.ListenerClass] listener class was found, but a
    resource injection failure has occurred.
    com.ibm.wsspi.injectionengine.InjectionException:
    com.ibm.ws.managedobject.ManagedObjectException: Managed
    Class
    {org.example.ListenerClass} does not match Bean Class
    {com.example.BeanClass}
    at
    com.ibm.ws.webcontainer.osgi.webapp.WebApp.inject(WebApp.jav
    a:12
    84)
    at
    com.ibm.ws.webcontainer.osgi.webapp.WebApp.injectAndPostCons
    truc
    t(WebApp.java:1420)
    at
    com.ibm.ws.webcontainer.osgi.webapp.WebApp.injectAndPostCons
    truc
    t(WebApp.java:1408)
    at
    com.ibm.ws.webcontainer.osgi.webapp.WebApp.loadListener(WebA
    pp.j
    ava:820)
    at
    com.ibm.ws.webcontainer.webapp.WebApp.loadLifecycleListeners
    (Web
    App.java:2224)
    ...
    
    Caused by: com.ibm.ws.managedobject.ManagedObjectException:
    Managed Class {org.example.ListenerClass} does not match
    Bean
    Class {com.example.BeanClass}
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFacto
    ry.g
    etBean(AbstractManagedObjectFactory.java:135)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFacto
    ry.g
    etBeanScope(AbstractManagedObjectFactory.java:144)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFacto
    ry.c
    reateManagedObject(AbstractManagedObjectFactory.java:269)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFacto
    ry.c
    reateManagedObject(AbstractManagedObjectFactory.java:247)
    at
    com.ibm.ws.cdi.impl.managedobject.AbstractManagedObjectFacto
    ry.c
    reateManagedObject(AbstractManagedObjectFactory.java:254)
    at
    com.ibm.ws.cdi.impl.managedobject.CDIManagedObjectFactoryImp
    l.cr
    eateManagedObject(CDIManagedObjectFactoryImpl.java:60)
    at
    com.ibm.ws.webcontainer.osgi.webapp.WebApp.inject(WebApp.jav
    a:12
    60)
    ... 21 more
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: ManagedObjectException occurs on        *
    *                      startup when a noncontextual class is   *
    *                      extended                                *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When a noncontextual class - such as a servlet - is extended the
    managedobject component will look for a bean for that class.
    Since noncontextuals do not have beans it will find the subclass
    and then throw an exception: ManagedObjectException: Managed
    Class {org.example.SuperClass} does not match Bean Class
    {com.example.SubClass}. This exception will be thrown during
    webservices startup, which will essentially take down
    webservices entirely - and no servlet will be available.
    

Problem conclusion

  • The managed object component was modified so that it no longer
    attempts to find a bean for a noncontextal class.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 19.0.0.8 and liberty 19.0.0.1.  Please refer to the
    Recommended Updates page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • The Vetoed annotation can be put on the noncontextual class to
    prevent managedobject from attempting to search for a bean for
    that class.
    

Comments

APAR Information

  • APAR number

    PH05829

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-11-29

  • Closed date

    2019-02-26

  • Last modified date

    2019-02-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

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"CD0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
26 February 2019