Why is my signed applet still running into permissions problems?
I have a signed applet that performs a JNDI lookup on a Weblogic 10.3.5 data source.
When I try to run the applet from the browser I get this exception:
This applet depends on two other jar files, which have both been signed (and verified) as well.
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "com.bea.core.internal.client" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
... 17 more
Ignored exception: java.lang.ExceptionInInitializerError
Any ideas on what this is? I thought that signing the applet would allow me to do things like this? I can perform the JNDI look up on a stand alone app so I am thinking that it is some sort of applet specific security setting. I just don't know what is causing this.
Environment: Win 7, JRE version 1.7.0_09-b05 Java HotSpot(TM) Client VM, Weblogic 10.3.5
Re: Why is my signed applet still running into permissions problems?
I think it has to do with the fact that at some point you assign a new Security Manager.
When you run the applet from the IDE, or eclipse or whatever java editor compiler, you don't get the message because applets are not forbidden from anything.
But when you run the applet from an webpage, an html, then the security permissions come up.
For instance take a look at this page of what applets are allowed and are not allowed to do:
What Applets are allowed and are not allowed to do...
May be you can find an answer there...bye good luck!