java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\\jenkins\\workspace\\9-dev\\jaxp\\test\\javax\\xml\\jaxp\\unittest\\validation\\Bug6773084In\\Bug6773084_11.xml" "read") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:548) at java.lang.SecurityManager.checkRead(java.base@9-ea/SecurityManager.java:887) at java.io.File.isDirectory(java.base@9-ea/File.java:845) at java.io.File.toURI(java.base@9-ea/File.java:733) at javax.xml.parsers.DocumentBuilder.parse(java.xml@9-ea/DocumentBuilder.java:205)

JDK Bug System | Felix Yang | 4 months ago
  1. 0

    This has been observed once on Windows X64. Please refer to the following test output. I suppose this is a test bug. The test looks to be trying to access files under workspace rather than the test work dir: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\jenkins\workspace\9-dev\jaxp\test\javax\xml\jaxp\unittest\validation\Bug6773084In\Bug6773084_11.xml" "read") ----------System.out:(60/1343)---------- [TestNG] Running: javax/xml/jaxp/unittest/validation/Bug6773084Test.java Waiting for barrier: 0 test validation.Bug6773084Test.test(): success Waiting for barrier: 24 Waiting for barrier: 23 Waiting for barrier: 22 Waiting for barrier: 21 Waiting for barrier: 20 Waiting for barrier: 19 Waiting for barrier: 18 Waiting for barrier: 17 Waiting for barrier: 16 Waiting for barrier: 15 Waiting for barrier: 14 Waiting for barrier: 13 Waiting for barrier: 12 Waiting for barrier: 11 Waiting for barrier: 10 Waiting for barrier: 9 Waiting for barrier: 8 Waiting for barrier: 7 Waiting for barrier: 6 Waiting for barrier: 5 Waiting for barrier: 4 Waiting for barrier: 3 Waiting for barrier: 2 Waiting for barrier: 1 Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... Validating.... =============================================== javax/xml/jaxp/unittest/validation/Bug6773084Test.java Total tests run: 1, Failures: 0, Skips: 0 =============================================== ----------System.err:(13/1343)*---------- java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\\jenkins\\workspace\\9-dev\\jaxp\\test\\javax\\xml\\jaxp\\unittest\\validation\\Bug6773084In\\Bug6773084_11.xml" "read") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:548) at java.lang.SecurityManager.checkRead(java.base@9-ea/SecurityManager.java:887) at java.io.File.isDirectory(java.base@9-ea/File.java:845) at java.io.File.toURI(java.base@9-ea/File.java:733) at javax.xml.parsers.DocumentBuilder.parse(java.xml@9-ea/DocumentBuilder.java:205) at validation.Bug6773084Test$XMLValiddator.run(Bug6773084Test.java:124) at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-ea/ThreadPoolExecutor.java:1158) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-ea/ThreadPoolExecutor.java:632) at java.lang.Thread.run(java.base@9-ea/Thread.java:843) STATUS:Failed.`main' threw exception: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\\jenkins\\workspace\\9-dev\\jaxp\\test\\javax\\xml\\jaxp\\unittest\\validation\\Bug6773084In\\Bug6773084_11.xml" "read")

    JDK Bug System | 4 months ago | Felix Yang
    java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\\jenkins\\workspace\\9-dev\\jaxp\\test\\javax\\xml\\jaxp\\unittest\\validation\\Bug6773084In\\Bug6773084_11.xml" "read") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:548) at java.lang.SecurityManager.checkRead(java.base@9-ea/SecurityManager.java:887) at java.io.File.isDirectory(java.base@9-ea/File.java:845) at java.io.File.toURI(java.base@9-ea/File.java:733) at javax.xml.parsers.DocumentBuilder.parse(java.xml@9-ea/DocumentBuilder.java:205)
  2. 0

    Env: win7/x86/IE11/jre9-b135, win7/x64/IE9/JDK9b135 Steps to reproduce: 0. Enable java console and trace 1. Go to Java Control Panel / Security, add http://www.ericharshbarger.org to ESL 2.Browse http://www.ericharshbarger.org/java 3.Click on 'Applets' 4.Click on 'Break Away' 5. Click "x" from browser to close applet 6. If you see the following exception in trace or console, this bug is reproduced: basic: Starting applet teardown java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "stopThread") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:548) at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(jdk.plugin@9-ea/AWTAppletSecurityManager.java:81) at java.lang.Thread.stop(java.base@9-ea/Thread.java:938) at BreakAway1ech.stop(BreakAway1ech.java) at sun.plugin2.uitoolkit.impl.awt.AWTAppletAdapter.stop(jdk.plugin@9-ea/AWTAppletAdapter.java:400) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(jdk.plugin@9-ea/Plugin2Manager.java:2088) at java.lang.Thread.run(java.base@9-ea/Thread.java:843) Note: no such issue with jre9-b95.

    JDK Bug System | 3 months ago | Crystal Yang
    java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "stopThread") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:548) at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(jdk.plugin@9-ea/AWTAppletSecurityManager.java:81) at java.lang.Thread.stop(java.base@9-ea/Thread.java:938)
  3. 0

    As of JDK 9 b120 the "Animator" demo applet throws an exception as follows :- jdk9b120/bin/appletviewer example1.html java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThread") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:541) at sun.applet.AppletSecurity.checkAccess(java.desktop@9-ea/AppletSecurity.java:231) at java.lang.Thread.checkAccess(java.base@9-ea/Thread.java:1488) at java.lang.Thread.setPriority(java.base@9-ea/Thread.java:1185) at Animator.init(Animator.java:299) at sun.applet.AppletPanel.run(java.desktop@9-ea/AppletPanel.java:423) at java.lang.Thread.run(java.base@9-ea/Thread.java:843) --- I am not sure of why, since I can't pinpoint what changed, but can see that in AppletSecurity.java the call to "currentAppletClassLoader()" returns null now .. which is then interpreted as meaning the Thread (which is the applet's own main thread), is not in its thread group ... and that seems wrong .. and presumably inconsistent with all history since 1995 since the applet has always made this call.

    JDK Bug System | 4 months ago | Philip Race
    java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThread") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:541) at sun.applet.AppletSecurity.checkAccess(java.desktop@9-ea/AppletSecurity.java:231) at java.lang.Thread.checkAccess(java.base@9-ea/Thread.java:1488) at java.lang.Thread.setPriority(java.base@9-ea/Thread.java:1185)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\\local\\aurora\\sandbox\\results\\workDir\\closed\\java\\lang\\invoke\\8155985\\T8155985.d\\main.0.jta" "read") at java.security.AccessControlContext.checkPermission(java.base@9-internal/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-internal/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-internal/SecurityManager.java:548) at java.lang.SecurityManager.checkRead(java.base@9-internal/SecurityManager.java:887) at java.io.FileInputStream.<init>(java.base@9-internal/FileInputStream.java:127) at java.io.FileInputStream.<init>(java.base@9-internal/FileInputStream.java:93) at java.io.FileReader.<init>(java.base@9-internal/FileReader.java:58) at com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:46)

    JDK Bug System | 4 months ago | Joseph Provino
    java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\\local\\aurora\\sandbox\\results\\workDir\\closed\\java\\lang\\invoke\\8155985\\T8155985.d\\main.0.jta" "read") at java.security.AccessControlContext.checkPermission(java.base@9-internal/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-internal/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-internal/SecurityManager.java:548) at java.lang.SecurityManager.checkRead(java.base@9-internal/SecurityManager.java:887) at java.io.FileInputStream.<init>(java.base@9-internal/FileInputStream.java:127) at java.io.FileInputStream.<init>(java.base@9-internal/FileInputStream.java:93) at java.io.FileReader.<init>(java.base@9-internal/FileReader.java:58)
  6. 0

    #section:main ----------messages:(3/162)---------- command: main AccessCachedPkg reason: User specified action: run main/othervm/java.security.policy=allow.policy AccessCachedPkg elapsed time (seconds): 1.231 ----------System.out:(0/0)---------- ----------System.err:(19/1535)---------- java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers") at java.security.AccessControlContext.checkPermission(java.base@9-internal/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-internal/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-internal/SecurityManager.java:541) at java.lang.Class.checkMemberAccess(java.base@9-internal/Class.java:2584) at java.lang.Class.getDeclaredMethod(java.base@9-internal/Class.java:2304) at AccessCachedPkg.callMain(AccessCachedPkg.java:98) at AccessCachedPkg.main(AccessCachedPkg.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-internal/Thread.java:804) JavaTest Message: Test threw exception: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers") JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")

    JDK Bug System | 8 months ago | Harsha Wardhana B
    java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers") at java.security.AccessControlContext.checkPermission(java.base@9-internal/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-internal/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-internal/SecurityManager.java:541) at java.lang.Class.checkMemberAccess(java.base@9-internal/Class.java:2584) at java.lang.Class.getDeclaredMethod(java.base@9-internal/Class.java:2304)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.security.AccessControlException

      access denied ("java.io.FilePermission" "C:\\jenkins\\workspace\\9-dev\\jaxp\\test\\javax\\xml\\jaxp\\unittest\\validation\\Bug6773084In\\Bug6773084_11.xml" "read") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:548) at java.lang.SecurityManager.checkRead(java.base@9-ea/SecurityManager.java:887) at java.io.File.isDirectory(java.base@9-ea/File.java:845) at java.io.File.toURI(java.base@9-ea/File.java:733) at javax.xml.parsers.DocumentBuilder.parse(java.xml@9-ea/DocumentBuilder.java:205)

      at validation.Bug6773084Test$XMLValiddator.run()
    2. validation
      Bug6773084Test$XMLValiddator.run
      1. validation.Bug6773084Test$XMLValiddator.run(Bug6773084Test.java:124)
      1 frame