2 Replies Latest reply: Feb 28, 2013 2:49 AM by alabala_kiril RSS

    Security Exception when loading Image in the background?

    alabala_kiril
      I've written a javafx app running in the browser. It loads a bunch of images in the background. It worked fine prior JRE 7 u11.
      However it is broken since JRE 7 u13. Images are not loaded correctly, failing with a SecurityException:
      java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
           at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
           at java.security.AccessController.checkPermission(AccessController.java:560)
           at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
           at sun.plugin2.applet.SecurityManagerHelper.checkAccessHelper(Unknown Source)
           at sun.plugin2.applet.FXAppletSecurityManager.checkAccess(Unknown Source)
           at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:315)
           at java.lang.Thread.init(Thread.java:376)
           at java.lang.Thread.<init>(Thread.java:446)
           at com.sun.javafx.runtime.async.BackgroundExecutor$1.newThread(BackgroundExecutor.java:52)
           at java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:610)
           at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:924)
           at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1371)
           at com.sun.javafx.runtime.async.AbstractAsyncOperation.start(AbstractAsyncOperation.java:107)
           at javafx.scene.image.Image$ImageTask.start(Image.java:917)
           at javafx.scene.image.Image.cycleTasks(Image.java:798)
           at javafx.scene.image.Image.access$200(Image.java:107)
           at javafx.scene.image.Image$ImageTask.onCompletion(Image.java:903)
           at javafx.scene.image.Image$ImageTask.onCompletion(Image.java:879)
           at com.sun.javafx.runtime.async.AbstractAsyncOperation$2.run(AbstractAsyncOperation.java:70)
           at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
           at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
           at java.security.AccessController.doPrivileged(Native Method)
           at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
           at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
           at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
           at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)
           at java.lang.Thread.run(Thread.java:722)
      If I dont' load the Image in the background -> it's working. Is it a bug?