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

"all-permissions" required for the execution of javafx.concurrent.Service#reset() in embedded / webstart mode

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: fx2.0.2, fx2.1
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Environment:

      javafx-2_1_0-beta-b12-windows-x64-07_feb_2012

      Description

      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();
          }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rbair Richard Bair
                Reporter:
                abienjfx Adam Bien (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: