IBM Support

PK50684: COM.IBM.WS.CLASSLOADER.HANDLER.GETINPUTSTREAM() OPENS A ZIPFILE,BUT NEVER CLOSES IT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The problem is due to the handling of zip files (or jar files)
    not being implicitely closed and instead, relying on the
    finalizer getting run for the object that has opened the file.
    
    com.ibm.ws.classloader.Handler$ClassLoaderURLConnection.getInput
    Stream
    .
    creates a ZipFile object pointing to the jar file in question,
    then calls getInputStream() for the entry within the
    jar file and returns the InputStream to the caller. The caller
    then performs some action on the jar file using the InputStream
    and calls close() on the InputStream when it has finished.
    However, this doesn't actually close the file at the native
    layer, this has to be done by calling close() on the ZipFile
    object. The problem is that the ZipFile object is not available
    to the code that is closing the InputStream as it is only used
    within the Handler, so when the InputStream is closed the
    ZipFile object is then eligible for garbage
    collection/finalization and thus it will be closed at some point
    in the future.
    

Local fix

  • na
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: IBM WebSphere Application Server users       *
    *                 seeing file locking problems on Microsoft    *
    *                 Windows using the Java Service Pages (JSP)   *
    *                 batch compiler.                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: Files used by the JSP batch compiler    *
    *                      from an ant process cannot be deleted   *
    *                      by that same process.                   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The wsjar protocol used by URLs, which are returned from class
    loader getResource, opens a ZipFile.  When
    openConnection().openStream() is called, a ZipFile is opened,
    and an InputStream is returned.  When the InputStream is
    closed, the corresponding ZipFile is not closed.
    

Problem conclusion

  • The InputStream returned from the wsjar URLConnection is
    specialized to close the ZipFile.
    The fix for this APAR is currently targeted for inclusion in
    fixpaks 5.1.1.17, 6.0.2.25, and 6.1.0.13.
    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

    PK50684

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    61W

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-08-08

  • Closed date

    2007-09-14

  • Last modified date

    2007-09-14

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • CLASSLDR
    

Fix information

  • Fixed component name

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R60A PSY

       UP

  • R60H PSY

       UP

  • R60I PSY

       UP

  • R60P PSY

       UP

  • R60S PSY

       UP

  • R60W PSY

       UP

  • R60Z PSY

       UP

  • R61A PSY

       UP

  • R61H PSY

       UP

  • R61I PSY

       UP

  • R61P PSY

       UP

  • R61S PSY

       UP

  • R61W PSY

       UP

  • R61Z 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":"6.1","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 December 2021