IBM Support

PI45878: Injected parameters passed in wrong order

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using @Inject on a method with multiple parameters on a
    Java EE component class (e.g. a Servlet or EJB class), the
    parameters might be passed to the method in the wrong order.
    
    This may either result in the parameter values being mixed
    up, or an error such as the following:
    
    CWNEN0074E: The [Ljava.lang.Object; type of the object
    instance obtained for the @Inject
    java.lang.reflect.Method.testInject(...) reference is
    incompatible with the type of the private void
    test.TestServlet.testInject(...) member.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile - Contexts and       *
    *                  Dependency Injection (CDI)                  *
    ****************************************************************
    * PROBLEM DESCRIPTION: Injected parameters are passed in the   *
    *                      wrong order                             *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When using @Inject on a method with multiple parameters on a
    Java EE component class (for example,. a Servlet or EJB class),
    the parameters might be passed to the method in the wrong
    order.
    
    This may either result in the wrong data being passed to each
    parameter, or an error such as the following:
    
    CWNEN0074E: The [Ljava.lang.Object; type of the object instance
    obtained for the @Inject
    java.lang.reflect.Method.testInject(...) reference is
    incompatible with the type of the private void
    test.TestServlet.testInject(...) member.
    

Problem conclusion

Temporary fix

  • Do not use methods which are annotated with @Inject and have
    multiple parameters on a Java EE component class. Either use
    multiple methods with a single parameter, or use @Inject on a
    field instead.
    

Comments

APAR Information

  • APAR number

    PI45878

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-07-29

  • Closed date

    2015-07-29

  • Last modified date

    2015-07-29

  • 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

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
27 April 2022