Skip to main content

AccessControlException: Cannot launch SwingXSet jnlp

7 replies [Last post]
askox
Offline
Joined: 2012-11-01
Points: 0

Mac OS X 10.7 + Java 7. When I open the SwingXSet jnlp, I get the following error:
java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "apple.laf.useScreenMenuBar" "write")
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 java.lang.System.setProperty(System.java:781)
at org.jdesktop.swingxset.SwingXSet.<clinit>(SwingXSet.java:135)
... 9 more

(This also happens with the SwingSet from the Oracle site.)

Perhaps this is involved: link

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kleopatra
Offline
Joined: 2003-06-11
Points: 0

hmm ... could this be similar to http://java.net/jira/browse/SWINGLABS_DEMOS-2 ?

We never found what that triggered (obviously not sooo many mac users around here :-)

Could you please add your stacktrace as a comment to that issue? Maybe mac experts can see anything in it beyond the obvious (will check if we use any of those properties, can't remember)

Thanks!
Jeanette

askox
Offline
Joined: 2012-11-01
Points: 0

Done.

kleopatra
Offline
Joined: 2003-06-11
Points: 0

thanks :-)

just fixed, maybe :-) Could you please try running the demo again and let me know how it goes (crossing fingers, that this is the only security break from our side)

Cheers
Jeanette

askox
Offline
Joined: 2012-11-01
Points: 0

Thank you for your interest. The stack trace has changed:

Log started: ven, 2 nov 2012 19:41:08 +0100
Match: beginTraversal
Match: digest selected JREDesc: JREDesc[version 1.6+, heap=-1--1, args=null, href=null, sel=false, null, null], JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_09
    location is: http://java.sun.com/products/autodl/j2se
    path is: /Library/Internet Plug-ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
    args is: null
    native platform is: Mac OS X, x86_64 [ x86_64, 64bit ]
    JavaFX runtime is: JavaFX 2.2.3 found at /Library/Internet Plug-ins/JavaAppletPlugin.plugin/Contents/Home/
    enabled is: true
    registered is: true
    system is: true

Match: ignoring maxHeap: -1
Match: ignoring InitHeap: -1
Match: digesting vmargs: null
Match: digested vmargs: [JVMParameters: isSecure: true, args: ]
Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: ]
Match: digest LaunchDesc: http://swinglabs-demos.java.net/demos/swingxset6/swingxset.jnlp
Match: digest properties: []
Match: JVM args: [JVMParameters: isSecure: true, args: ]
Match: endTraversal ..
Match: JVM args final:
Match: Running JREInfo Version    match: 1.7.0.09 == 1.7.0.09
Match: Running JVM args match: have:<>  satisfy want:<>
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at org.jdesktop.application.utils.OSXAdapter.setHandler(OSXAdapter.java:138)
at org.jdesktop.application.utils.OSXAdapter.setQuitHandler(OSXAdapter.java:74)
at org.jdesktop.application.Application.create(Application.java:257)
at org.jdesktop.application.Application$1.run(Application.java:185)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "canProcessApplicationEvents")
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 com.apple.eawt.Application.checkSecurity(Application.java:75)
at com.apple.eawt.Application.<clinit>(Application.java:64)
... 20 more

This is javaws1518585436587308410.trace, from /Users/my username/Library/Application Support/Oracle/Java/Deployment/log. I also found a long javaws7857509493914753547.log, that blames the same exception in XML format.

In the Java preferences, I cleared the cache and (in the tab "Advanced") checked the following options under "Debug".
--> Enable trace --> Enable event recording --> Show exceptions in applet's lifecycle

askox
Offline
Joined: 2012-11-01
Points: 0

Thank you again for your time. :) hm, now I have the same problem that the JIRA ticket is about. I've reported it to Apple as "AccessControlException(RuntimePermission canProcessApp) at com.apple.eawt.Application.".

kleopatra
Offline
Joined: 2003-06-11
Points: 0

hmm .. but it runs or not?

Last time we have seen that one it turned out to be a bit sloppy exception handling in BSAF:

http://java.net/jira/browse/SWINGX-1501

Cheers
Jeanette

askox
Offline
Joined: 2012-11-01
Points: 0

No, it doesn't.