IBM Support

PI28927: INNER CLASS NAME CONTAINING A '$' CHARACTER IS INCORRECTLY OBTAINED BY THE ANNOTATION SCANNER.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • If an inner class name contains a '$' character, the
    annotation scanner may not find that class:
    
    annotations   W com.ibm.ws.amm.scan.context.ScannerContextImpl
    getInputDataForClass Failed to open resource [
    myPackage/OuterClass/InnerClass.class ] from module [
    myApp.war ]
    
    As a result, a ClassNotFoundException error message is issued:
    
    annotation    W
    com.ibm.ws.webcontainer.annotation.WASAnnotationHelper
    collectClasses
    SRVE8000W: Skipped class that failed to initialize for
    annotation scanning.
    java.lang.ClassNotFoundException:
    myPackage.OuterClass.InnerClass
    

Local fix

  • Change the '$' character in the inner class name and its
    mapping in the web.xml file to something else.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V8.5 with applications using Filter  *
    *                  or Listener classes as an inner class.      *
    ****************************************************************
    * PROBLEM DESCRIPTION: Filter and Listener classes are not     *
    *                      handled properly when defined as an     *
    *                      inner class.                            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When a web Filter or Listener class is defined as an inner
    class, the wrong API is used to obtain the class name. For
    example, for "mypackage.MyOuterClass$MyInnerClass", the
    incorrect name "mypackage.MyOuterClass.MyInnerClass" is
    generated. This incorrect name is stored in the merged
    deployment descriptor (WEB-INF/web_merged.xml, a file specific
    to IBM WebSphere Application Server web module deployments)
    when the application is deployed. This causes the Filter or
    Listener class to fail to load when the application is started.
    The symptom of this problem is a class load error which
    references the inner class name with a "." instead of a "$"
    before the inner class name. For example:
    java.lang.ClassNotFoundException:
    mypackage.MyOuterClass.MyInnerClass
    

Problem conclusion

  • The problem was fixed by changing the API used to obtain the
    fully qualified name of Filter and Listener classes.
    
    Because the problem creates an incorrect
    "WEB-INF/web_merged.xml" entry, any web module which
    shows this problem must be redeployed following installation
    of the APAR fix in order to correct the problem.
    
    The fix for this APAR is currently targeted for inclusion in
    fixpack 8.5.5.6. 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

    PI28927

  • 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

    2014-11-03

  • Closed date

    2015-02-19

  • Last modified date

    2016-03-27

  • 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

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