IBM Support

PM51802: INJECTIONPOINT IS NULL WHEN USING @PRODUCES

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • InjectionPoint is null when using @Produces in WebSphere
    Application Server V8. The NullPointerException is caused by
    the CDI container providing a null InjectionPoint into a
    producer method.
    

Local fix

  • Candidate to go into 8.0.0.3.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server version    *
    *                  8.0                                         *
    *                  users of CDI (Contexts and Depenency        *
    *                  Injection)                                  *
    ****************************************************************
    * PROBLEM DESCRIPTION: The CDI container must provide a bean   *
    *                      with scope @Dependent, bean type        *
    *                      InjectionPoint and qualifier @Default,  *
    *                      allowing dependent beans to obtain      *
    *                      information about the injection point   *
    *                      to which they belong.                   *
    *                      In certain circumstances this           *
    *                      InjectionPoint is null or returns the   *
    *                      wrong information about the injection   *
    *                      point to which they belong.             *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    This is a two part problem
    1. A bean with scope @Dependent may inject an instance of
    InjectionPoint and access metadata relating to the injection
    point to which it belongs. This instance of InjectionPoint is
    null when the @Inject of the dependent bean is in an EJB.
    The first problem is fixed by default and InjectionPoint now
    contains the right information
    2. CDI container uses ThreadLocals to track the current
    InjectionPoint. When multiple injection points are interleaved,
    the CDI container does not correctly track the state of of the
    InjectionPoint's such that sometimes the most deeply nested
    InjectionPoint would still be on the thread local when it
    shouldn't be.
    The fix to the second problem is remedied by keeping a stack of
    injection points and enabled by setting the JVM custom property
    Name: com.ibm.ws.webbeans.trackInjectionPointsWithStack
    Value: true
    The fix has been enabled by a JVM custom property because it is
    possible to have the InjectionPoint as null in cases
    where earlier we wouldn't have before.
    For more details on how to set the JVM property,
    refer to the article "Java virtual machine custom properties"
    in the Information Center for your WebSphere Application
    Server version and operating system.
    

Problem conclusion

  • CDI container has been fixed to handle InjectionPoint
    injections in Producer methods and interleaved injections.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 8.0.0.4.
    
    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

    PM51802

  • 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

    2011-11-08

  • Closed date

    2012-01-26

  • Last modified date

    2015-04-28

  • 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

[{"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:
28 October 2021