Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

AccessControlException while an applet is executing

808981Oct 28 2010 — edited Oct 29 2010
Hi to all:

I am developing an applet and I show it in the main JSP page of a service place in Tomcat (Linux).
The applet needs to access to some data in a smartcard and I use another class for this purpose. This class uses javaxsmartcardio and JNA.jar

In the first access from the applet to this class, the JVM shows this error:

java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.reflect.generics.reflectiveObjects)
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.checkPackageAccess(Unknown Source)
at sun.plugin2.applet.Applet2SecurityManager.checkPackageAccess(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at PinApplet.init(PinApplet.java:47)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Excepción: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.reflect.generics.reflectiveObjects)

Why occurs this error?
I think about the permissions to access to low level (hardware) functions, but the exception is thrown in the line when a method of the class that implemented the access to the smartcard is first called.
I think about the permissions to the .class file, but all the involved files have 777.

Maybe, this message should be in "Java for devices, Card and TV", but I think that the error is in the applet or in something related with the browsers.


Thanks in advance
Dani

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 26 2010
Added on Oct 28 2010
6 comments
397 views