-
Bug
-
Resolution: Fixed
-
P2
-
fx2.0.2, fx2.1
-
javafx-2_1_0-beta-b12-windows-x64-07_feb_2012
Execution of the method javafx.concurrent.Service#reset() causes a security Exception caused by lack of the "modifyThreadGroup" permission. Signing and deployment with <all-permission/> fixes the problem.
Signing a Jar because of Service#reset() is inconvenient and requires the user to confirm the security risks.
Exception:
java.lang.ExceptionInInitializerError
at org.lightview.presenter.DashboardPresenter.startFetching(DashboardPresenter.java:103)
at org.lightview.presenter.DashboardPresenter.restartService(DashboardPresenter.java:85)
at org.lightview.presenter.DashboardPresenter$1.changed(DashboardPresenter.java:75)
at org.lightview.presenter.DashboardPresenter$1.changed(DashboardPresenter.java:73)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(Unknown Source)
at javafx.beans.property.StringPropertyBase.markInvalid(Unknown Source)
at javafx.beans.property.StringPropertyBase.bind(Unknown Source)
at org.lightview.view.Dashboard.bind(Dashboard.java:126)
at org.lightview.view.Dashboard.<init>(Dashboard.java:64)
at org.lightview.App.start(App.java:34)
at com.sun.javafx.applet.FXApplet2$1.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.SecurityManagerHelper.checkAccessHelper(Unknown Source)
at sun.plugin2.applet.FXAppletSecurityManager.checkAccess(Unknown Source)
at java.lang.ThreadGroup.checkAccess(Unknown Source)
at java.lang.ThreadGroup.checkParentAccess(Unknown Source)
at java.lang.ThreadGroup.<init>(Unknown Source)
at java.lang.ThreadGroup.<init>(Unknown Source)
at javafx.concurrent.Service.<clinit>(Unknown Source)
... 18 more
The relevant source in line 85 is (javafx.concurrent.Service#reset()):
void restartService() {
if (this.service != null && this.service.isRunning()) {
this.service.cancel();
this.service.reset();
}
this.startFetching();
}
Signing a Jar because of Service#reset() is inconvenient and requires the user to confirm the security risks.
Exception:
java.lang.ExceptionInInitializerError
at org.lightview.presenter.DashboardPresenter.startFetching(DashboardPresenter.java:103)
at org.lightview.presenter.DashboardPresenter.restartService(DashboardPresenter.java:85)
at org.lightview.presenter.DashboardPresenter$1.changed(DashboardPresenter.java:75)
at org.lightview.presenter.DashboardPresenter$1.changed(DashboardPresenter.java:73)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(Unknown Source)
at javafx.beans.property.StringPropertyBase.markInvalid(Unknown Source)
at javafx.beans.property.StringPropertyBase.bind(Unknown Source)
at org.lightview.view.Dashboard.bind(Dashboard.java:126)
at org.lightview.view.Dashboard.<init>(Dashboard.java:64)
at org.lightview.App.start(App.java:34)
at com.sun.javafx.applet.FXApplet2$1.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.SecurityManagerHelper.checkAccessHelper(Unknown Source)
at sun.plugin2.applet.FXAppletSecurityManager.checkAccess(Unknown Source)
at java.lang.ThreadGroup.checkAccess(Unknown Source)
at java.lang.ThreadGroup.checkParentAccess(Unknown Source)
at java.lang.ThreadGroup.<init>(Unknown Source)
at java.lang.ThreadGroup.<init>(Unknown Source)
at javafx.concurrent.Service.<clinit>(Unknown Source)
... 18 more
The relevant source in line 85 is (javafx.concurrent.Service#reset()):
void restartService() {
if (this.service != null && this.service.isRunning()) {
this.service.cancel();
this.service.reset();
}
this.startFetching();
}
- relates to
-
JDK-8094925 [Service,WebView] Security exception in Service.cancel and URLLoaderThreadFactory when running sandboxed applet
- Resolved