IBM Support

PI26448: WHEN USING HANDLESTYPES ANNOTATION, THE HANDLE CLASS MAY NOT BE PASSED IN CORRECTLY ON THE ONSTARTUP METHOD.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using a ServletContainerInitializer which has
    @HandlesTypes(Foo.class) then Foo.class itself will also be
    passed into the SetClass parameter of the onStartup method.
    
    The classes which should get passed in to onStartup must be all
    classes which have this annotation used on field, member, type
    OR has the class or interface as SUPER type.
    
    It must not pass in the original annotation itself.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Full       *
    *                  Profile version 8.5.5 users of a            *
    *                  ServletContainerInitializer (SCI)           *
    ****************************************************************
    * PROBLEM DESCRIPTION: The onStartup method of an              *
    *                      application SCI does not have the       *
    *                      correct set of classes.                 *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    During the application startup, the WebContainer passes in the
    handled classes specified in the annotated @HandlesTypes into
    the onStartup method of the implemented
    ServletContainerInitializer class.
    For example:
    @HandlesTypes({Class1, Class2, Class3, ...})
    public  class  ExampleSCInitializer implements
    ServletContainerInitializer {
    public void onStartup(Set<Class<?>> classes,
    ServletContext context)
    throws ServletException
    {
    // initialization code...
    }
    }
    The onStartup's set of classes  must be all the application
    classes which extend, implement, or have been annotated with
    the class types listed by the @HandlesTypes annotation, but
    not the handled classes themselves (for example Class1,
    Class2, and Class3 should not be included in the set of
    classes passing into the onStartup method).
    

Problem conclusion

  • The WebContainer code was modified to not pass in the handled
    classes into the onStartup method of the implemented SCI class.
    
    A new WebContainer custom property needs to be set to enable
    the behavior provided by this APAR:
    
    com.ibm.ws.webcontainer.excludeHandledTypesClasses = true
    (default is false)
    
    Please refer to the following technote for instructions on
    enabling WebContainer custom properties:
    
    http://www.ibm.com/support/docview.wss?rss=180&uid=swg21284395
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 8.5.5.5
    
    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

    PI26448

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-09-24

  • Closed date

    2014-12-11

  • Last modified date

    2014-12-11

  • 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