IBM Support

PH11818: UNNECESSARY ANNOTATION SCAN HAPPENS IF A CLASS IMPLEMENTS JAVA.UTIL.EVENTLISTENER

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • We use @Resource annotation for Spring, not Java EE. If the
    class implements java.util.EventListener, unnecessary annotation
    scan happens and it requests the binding information for the
    resource during the deployment. But the resource is for Spring,
    not Java EE, thus, it shouldn't be requested.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server with an application using the        *
    *                  @Resource annotation for Spring on a class  *
    *                  that implements java.util.EventListener.    *
    ****************************************************************
    * PROBLEM DESCRIPTION: A class which implements                *
    *                      java.util.EventListener is scanned      *
    *                      unnecessarily for annotations.          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    An application class which implements java.util.EventListener
    triggers an annotation scan during deployment.  The
    "implements java.util.EventListener" clause is not a valid
    reason to perform the annotation scan.  Annotations in such a
    class should be ignored from a Java EE perspective unless
    there is a valid reason to scan the class.
    The result is that annotations found in the class, such as
    @Resource, are acted upon by the application server.  In the
    case of @Resource, the administrative console asks for bindings
    information for the resource.  However, the @Resource might be
    intended for use by Spring, not Java EE.
    

Problem conclusion

  • Since this incorrect behavior has been in place for many
    years, it will remain the default behavior to avoid breaking
    existing applications that might depend on the incorrect
    behavior.
    
    The correct behavior can be enabled by setting the following
    custom property to true.
    
    Property name:  com.ibm.ws.amm.discriminator.enablePH11818
    Value to enable:  true
    Value to disable: false
    Default value:  false
    
    The property can also be enabled for a specific EAR or WAR by
    editing the META-INF/MANIFEST.MF file, adding the following
    line:
    
    IBM-ENABLE-PH11818 : true
    
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 8.5.5.16 and 9.0.5.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

    PH11818

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-05-07

  • Closed date

    2019-06-03

  • Last modified date

    2019-06-03

  • 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

  • R900 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:
27 April 2022