JDK-8060088 : com/sun/tracing/BasicWithSecurityMgr.java fails with modular image with java.security.AccessControlException
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 9,9-repo-jigsaw
  • Priority: P3
  • Status: Resolved
  • Resolution: Other
  • Submitted: 2014-10-10
  • Updated: 2015-02-06
  • Resolved: 2015-02-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Relates :  
Relates :  
Description
Test from jdk/test 
com/sun/tracing/BasicWithSecurityMgr.java
fails with modular image with java.security.AccessControlException

Tested with jigsaw/m2 build: 
java version "1.9.0-ea" 
Java(TM) SE Runtime Environment (build 1.9.0-ea-jigsaw-nightly-h1424-20141002-b34) 
Java HotSpot(TM) Client VM (build 1.9.0-ea-jigsaw-nightly-h1424-20141002-b34, mixed mode) 

----------System.err:(18/1142)----------
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.tracing")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
	at java.security.AccessController.checkPermission(AccessController.java:894)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:541)
	at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1479)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:328)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:359)
	at BasicWithSecurityMgr.main(BasicWithSecurityMgr.java:56)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
	at java.lang.Thread.run(Thread.java:745)
Comments
After integrating JDK-8062303 this becomes not an issue
06-02-2015

Old test run, just adding rule to match bug. Aurora run: http://vmsqe-app.russia.sun.com/surl/b6 RULE com/sun/tracing/BasicWithSecurityMgr.java Exception java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.tracing")
29-10-2014

It seems this is due to JDK-8040059 change and test need to create/update it's policy file.
10-10-2014