Skip to Main Content

Java Card

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.

Error integrating a web applet and a SmartCard application

808981Jan 11 2011 — edited Jan 13 2011
I have developed two codes separately: an applet who gets an String and makes some work with it and a console application that reads an String from a SmartCard (using javax.smartcardio package and some objects in JNA.jar).
The applet get the String from a constant String in the own class and the two codes works properly in a separate mode. The main purpose is to merge the two codes and get the applet to read the String from the Smartcard

In a first attempt to integrate the two codes, I get the following exception in the first line I try to access the SmartCard code:


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 sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at PinApplet.init(PinApplet.java:46)
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)

After exhaust all the options in my mind, can anybody give me new ideas/reasons for this exception?

Comments

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

Post Details

Locked on Feb 10 2011
Added on Jan 11 2011
6 comments
599 views