IBM Support

PI52014: User customized provider life cycle annotation @PostConstruct @P reDestroy not work or throw NullPoint Exception when stop server

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • User customized provider defined in JAX-RS 2.0 Application
    sub-class getClasses method doesn't work
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile - Web Services (JAX- *
    *                  RS 2.0)                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: User customized provider life cycle     *
    *                      annotation @PostConstruct @PreDestroy   *
    *                      does not work or causes                 *
    *                      NullPointerException when stopping      *
    *                      server                                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The life cycle annotation @PostConstruct and @PreDestroy on a
    user customized provider which registers in a JAX-RS 2.0
    Application sub-class's getClasses method doesn't work, or
    throws Null Pointer Exception during the stop server process.
    

Problem conclusion

  • The per-request provider instance is now held by the server side
    and invokes the method that annotated with @PostConstruct and
    @PreDestroy when the instance is constructed and before it is
    destroyed.
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.9.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • For annotation @PreDestroy, can register in method
    getSingletons.
    

Comments

APAR Information

  • APAR number

    PI52014

  • 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-11-08

  • Closed date

    2015-11-12

  • Last modified date

    2015-11-12

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