IBM Support

PM69202: IT IS NOT POSSIBLE TO USE @INJECT ANNOTATION FOR CLASS CONSTRUCTORS WHEN THE SAME CLASS HAS @INTERCEPTOR ANNOTATION.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • It is not possible to use @Inject annotation for class
    constructors when the same class has an @Interceptor annotation.
    .
    The following exception occurs.
    .
    Caused by: java.lang.InstantiationException:
    com.swissre.mds.was8.cdi.InterceptedBean_$$_javassist_1
    at java.lang.J9VMInternals.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1355)
    at
    org.apache.webbeans.proxy.JavassistProxyFactory.createDependentS
    copedBea
    nProxy(JavassistProxyFactory.java:317)
    at
    org.apache.webbeans.component.AbstractInjectionTargetBean.create
    DefaultI
    nstance(AbstractInjectionTargetBean.java:140)
    ...
    

Local fix

  • If the customer wants a work around in the meantime, they should
    be able to add a zero arg constructor to their dependent-scoped
    intercepted managed bean and the problem they are seeing should
    go away, and the code work as they expect.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V8.0 and V8.5                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: It is not possible to use @Inject       *
    *                      annotation for @Intercepted classes     *
    *                      that do not have a no-arg constructor   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    It is not possible to use @Inject annotation for @Intercepted
    classes that do not have a no-arg constructor, instead of the
    object being properly injected an InstantiationException would
    occur.
    

Problem conclusion

  • The code was fixed to perform proper injection for the
    no-arg contructor case.
    The fix for this APAR is currently targeted for inclusion in
    fix packs 8.0.0.5, and 8.5.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

Comments

APAR Information

  • APAR number

    PM69202

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-07-19

  • Closed date

    2012-08-30

  • Last modified date

    2014-02-18

  • 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:
29 October 2021