IBM Support

IZ51152: LOGGING CODE CAUSES ACCESSCONTROLEXCEPTION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: When the security manager is installed, logging
    code will throw an AccessControlException which cause the
    application exit.
    .
    Stack Trace: Exception in thread "main"
    java.security.AccessControlException:
    Access denied (java.util.logging.LoggingPermission control)
    
            at
    java.security.AccessController.checkPermission(AccessController.
    java:108)
            at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:5
    32)
            at
    java.util.logging.LogManager.checkAccess(LogManager.java:293)
            at java.util.logging.Handler.setLevel(Handler.java:393)
    
            at java.util.logging.Logger.initHandler(Logger.java:451)
    
            at java.util.logging.Logger.getHandlers(Logger.java:466)
    
            at java.util.logging.Logger.log(Logger.java:1095)
    
            at java.util.logging.Logger.log(Logger.java:994)
    
            at test56689a.main(test56689a.java:30)
    .
    

Local fix

  • You can add the following to the default permissions section of
    java.policy:
     permission java.util.logging.LoggingPermission "control";
    This would avoid the security exception.
    

Problem summary

  • If the security manager is installed, the Logger class will
    invoke Handler.setLevel(Level) internally which will perform
    security checking. The checking is unnecessary since Logger is
    invoked by trusted classlib.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR6
    .
    Add a new internal api to set level in java.util.logging package
    without security checking.
    .
    To obtain the fix:
    Install build 20090516 or later
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ51152

  • 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

    2009-05-15

  • Closed date

    2009-05-18

  • Last modified date

    2009-05-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

    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:
27 May 2009