IBM Support

PI52932: JPA2 ERROR COM.IBM.WSSPI.INJECTIONENGINE.INJECTIONEXCEPTION AFTER MIGRATION FROM V7

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Application migrated  from WebSphere Application server
    Version 7 to 8 and encountering following error on all JPAs
    lookup.
    
    
    com.ibm.websphere.naming.CannotInstantiateObjectException:
    Exception occurred while the JNDI NamingManager was processing
    a javax.naming.  Reference object. [Root exception is
    com.ibm.wsspi.injectionengine.
    InjectionException: EJBContext may only be looked up by or
    injected into an EJB]
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server using JPA EntityListeners            *
    ****************************************************************
    * PROBLEM DESCRIPTION: An InjectionException is thrown when    *
    *                      looking up java:comp/EJBContext from    *
    *                      a JPA EntityListener.                   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    JPA EntityListener methods can be called immediately after an
    EJB method completes, when the EJB Container commits the
    transaction that was started for the EJB method. This is also
    the time when the EJBContainer removes EJB related contexts
    from the thread, thus making java:comp references no longer
    available.  Beginning in V8.0, the EJB Container began
    removing the naming context from the thread before the JPA
    EntityListener methods were called.  This results in JPA
    EntityListener methods no longer having access to references
    in the java:comp name space.
    

Problem conclusion

  • JPA EntityListener methods do require access to the EJB
    contexts during EJB method commit processing. The EJBContainer
    has been updated such that JPA EntityListener methods are
    called prior to removing the EJB contexts from the thread.
    
    The fix for this APAR is currently targeted for inclusion in
    fix packs 8.0.0.13 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

    PI52932

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-11-20

  • Closed date

    2015-12-17

  • Last modified date

    2016-02-16

  • 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

  • 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:
11 January 2022