IBM Support

PM82837: CDI INTERCEPTOR CANNOT CALL INVOCATIONCONTEXT#GETTARGET IN CATCH BLOCK.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Use of getTarget class from javax.interceptor.InvactionContext
    returns null.
    
    If the method getTarget is within the TRY, it works perfectly.
    
    A jira opened with the same problem can be seen below:
    
    http://comments.gmane.org/gmane.comp.java.openwebbeans.user/379
    The error thrown is:
    
    [2/1/13 15:04:00:296 GMT-02:00] 00000021 servlet       E
    
    com.ibm.ws.webcontainer.servlet.ServletWrapper service
    SRVE0014E:
    Uncaught service() exception root cause
    test.servlet.CDITestServlet:
    javax.servlet.ServletException: java.lang.NullPointerException
    
        at
    test.servlet.CDITestServlet.doGet(CDITestServlet.java:44)
    
        at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
    
        at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    
        at
    
    com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWr
    apper.ja
    va:1224)
    

Local fix

  • No work know work around found.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of Contexts and Dependency        *
    *                  Injection (CDI) in                          *
    *                  IBM WebSphere Application Server            *
    ****************************************************************
    * PROBLEM DESCRIPTION: CDI Interceptors that call              *
    *                      javax.interceptor.InvocationContext#get *
    *                      Target                                  *
    *                      will get a null return value.           *
    ****************************************************************
    * RECOMMENDATION:  Apply this fix if a null value is returned  *
    *                  by                                          *
    *                  javax.interceptor.InvocationContext#getTarg *
    *                  et                                          *
    ****************************************************************
    If an exception was thrown by an intercepted method invocation,
    and an interceptor calls
    javax.interceptor.InvocationContext#getTarget in a catch
    block, the return value will be null instead of the instance
    the method was originally invoked on.
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PM82837

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-02-14

  • Closed date

    2013-03-12

  • Last modified date

    2013-03-12

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

Document Information

Modified date:
02 November 2021