This discussion is archived
4 Replies Latest reply: Jan 20, 2011 11:50 AM by 832617 RSS

Self-Signed Applet & AccessControl.doPrivileged called but throws AccConExc

832617 Newbie
Currently Being Moderated
hi-

i have an applet that is calling a method that uses the Reflection API and its throwing AccessControlException.
i have self-signed the JAR and i'm also calling the method in a "doPrivileged" block
(as described in http://download.oracle.com/javase/1.5.0/docs/api/java/security/AccessController.html).
the output from the java console:

Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)
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.checkMemberAccess(Unknown Source)
at java.lang.Class.checkMemberAccess(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at org.codehaus.jackson.map.introspect.AnnotatedClass._addMemberMethods(AnnotatedClass.java:589)
at org.codehaus.jackson.map.introspect.AnnotatedClass.resolveMemberMethods(AnnotatedClass.java:526)
at org.codehaus.jackson.map.introspect.BasicClassIntrospector.forSerialization(BasicClassIntrospector.java:132)
at org.codehaus.jackson.map.introspect.BasicClassIntrospector.forSerialization(BasicClassIntrospector.java:16)
at org.codehaus.jackson.map.SerializationConfig.introspect(SerializationConfig.java:683)
at org.codehaus.jackson.map.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:95)
at org.codehaus.jackson.map.ser.StdSerializerProvider._createUntypedSerializer(StdSerializerProvider.java:691)
at org.codehaus.jackson.map.ser.StdSerializerProvider._createAndCacheUntypedSerializer(StdSerializerProvider.java:634)
at org.codehaus.jackson.map.ser.StdSerializerProvider.findValueSerializer(StdSerializerProvider.java:408)
at org.codehaus.jackson.map.ser.StdSerializerProvider.findTypedValueSerializer(StdSerializerProvider.java:482)
at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:294)
at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:224)
at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1030)
at test.MyTest$1.run(MyTest.java:1200)
at java.security.AccessController.doPrivileged(Native Method)

has anyone else run into this problem before?

thanks,
augusto.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points