IBM Support

IZ96139: JAVA.SECURITY.ACCESSCONTROLEXCEPTION THROWN WHEN FILENAME>260CHA RS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: java.security.AccessControlException on read, or
    delete (don't know about write, but assume also), when using the
    new File(String, String) constructor with the
     total file name being > 260 characters, on Windows with IBM JVM
    1.5 (SR11 FP1) and 1.6 (SR8).
    This does not happen with Oracle 1.5 or 1.6 jvms (nor with IBM
    142).
    This does not happen if the constructor File(String) is used.
    This does not happen on Linux.
    Research pointed to a possible issue with the assumed setting of
    MAX_PATH on Windows systems;
    This link <OSB>1<CSB> explains that 'the maximum length for a
    path is MAX_PATH, which is defined as 260 characters'. But it
    also says that some functions 'also have Unicode versions
     to permit an extended-length path for a maximum total path
    length of 32,767 characters.'
    .
    Stack Trace: We have reproduced this defect on local machine and
    got following exception trace:
    java.security.AccessControlException: Access denied
    (java.io.FilePermission
    c:\abcdefgh\0123456789012345678901234567890123456789012345678901
    2345678901
    2345678901234567890123456789012345678901234567890123456789012345
    6789012345678901234567890123456789012345678901234567890123456789
    0123456789012345678901
    23456789012345678901234567890123456789\tmp read)
            at
    java.security.AccessController.checkPermission(AccessController.
    java:108)
            at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:5
    33)
            at
    java.lang.SecurityManager.checkRead(SecurityManager.java:872)
            at java.io.File.exists(File.java:731)
            at java.io.File.mkdirs(File.java:1181)
            at CMVC172165$1.run(CMVC172165.java:27)
            at
    java.security.AccessController.doPrivileged(AccessController.jav
    a:251)
            at CMVC172165.main(CMVC172165.java:17)
    .
    NA
    

Local fix

  • NA
    

Problem summary

  • The problem was in get_component_name(..) method , the Windows
    API FindFirstFile() is called to look for a file and return a
    file handle to it, if the file h
    andle is not returned it means that the file does not exist or
    it is of the wrong type, or it is denied access. In such cases
    we simply return the name of the file we are tr
    ying to search.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR9 FP1
    .
    The JVM has been updated to handle long filenames.
    .
    To obtain the fix:
    Install build 20101207 or later
    

Temporary fix

  • NA
    

Comments

APAR Information

  • APAR number

    IZ96139

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-03-09

  • Closed date

    2011-03-09

  • Last modified date

    2011-03-09

  • 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

    JAVA CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R600 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3Y","label":"Java Class Libraries"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
09 March 2011