JDK-8198470 : AccessControlException when running SandboxAppTest
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8,9,10
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-02-20
  • Updated: 2018-08-03
  • Resolved: 2018-08-03
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
While running the SandboxAppTest we get: java.security.AccessControlException: access denied ("java.util.logging.LoggingPermission" "control")

To reproduce, run the test as follows:

gradle --info -PFULL_TEST=true :systemTests:cleanTest :systemTests:test --tests test.sandbox.SandboxAppTest

You will see the following exception in the console:

Exception in thread "JavaFX Application Thread" java.lang.ExceptionInInitializerError
	at javafx.web/com.sun.webkit.WebPage.twkUpdateContent(Native Method)
	at javafx.web/com.sun.webkit.WebPage.updateDirty(WebPage.java:306)
	at javafx.web/com.sun.webkit.WebPage.updateContent(WebPage.java:633)
	at javafx.web/com.sun.javafx.sg.prism.web.NGWebView.update(NGWebView.java:74)
	at javafx.web/javafx.scene.web.WebView.handleStagePulse(WebView.java:962)
	at javafx.web/javafx.scene.web.WebView.lambda$new$0(WebView.java:267)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:410)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:409)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:433)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:518)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:319)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.security.AccessControlException: access denied ("java.util.logging.LoggingPermission" "control")
	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:335)
	at java.logging/java.util.logging.LogManager.checkPermission(LogManager.java:2417)
	at java.logging/java.util.logging.Logger.checkPermission(Logger.java:622)
	at java.logging/java.util.logging.Logger.setLevel(Logger.java:2001)
	at javafx.web/com.sun.webkit.graphics.WCMediaPlayer.<clinit>(WCMediaPlayer.java:43)
	... 18 more


This appears to be a product bug rather than a test bug. It seems that WCMediaPlayer attempts to set the log level without asserting permissions.
Comments
I verified that this is fixed by the patch for JDK-8195974, so I'm closing this as a duplicate.
03-08-2018

Since the code in question was using j.u.l, it wasn't touched as part of fixing JDK-8195799, but will be address with JDK-8195974.
21-04-2018

As part of JDK-8195799 we will stop setting the log level, meaning that the failing code will likely be removed. Once JDK-8195799 is fixed, we should retest this, and close a duplicate if the problem is no longer present.
20-02-2018