Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8189212

Exception: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.nio.fs")

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 10
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      The following 3 tests failed in hs-nightly 2017-10-11 on all platforms.

      java/lang/Class/packageAccess/AccessCachedPkg.java
      java/lang/ClassLoader/forNameLeak/ClassForNameLeak.java
      java/util/logging/FileHandlerPath.java

      A common part of the exception trace seems to starting at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:495)

      ----------System.out:(0/0)----------
      ----------System.err:(26/2013)----------
      java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.nio.fs")
      at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
      at java.base/java.security.AccessController.checkPermission(AccessController.java:895)
      at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:558)
      at java.base/java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1534)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:186)
      >>> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:495)
      at java.base/sun.nio.fs.UnixNativeDispatcher.lstat0(Native Method)
      at java.base/sun.nio.fs.UnixNativeDispatcher.lstat(UnixNativeDispatcher.java:322)
      at java.base/sun.nio.fs.UnixFileAttributes.get(UnixFileAttributes.java:72)
      at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:419)
      at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:263)
      at java.base/java.nio.file.Files.move(Files.java:1413)
      at AccessCachedPkg.move(AccessCachedPkg.java:82)
      at AccessCachedPkg.main(AccessCachedPkg.java:53)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.base/java.lang.Thread.run(Thread.java:844)

      JavaTest Message: Test threw exception: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.nio.fs")
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.nio.fs")

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mchung Mandy Chung
                Reporter:
                iklam Ioi Lam
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: