4 Replies Latest reply on Jun 6, 2011 6:46 PM by Zak S

    Security: IdentityObject class and private fields

    riboriori riboriori Newbie

      Hi all,
      I have a controller (TestAction) in wich in inject IdentitySession in order to
      create a test user (TESTUSER) like so:

      public class TestAction implements Serializable {
        @Inject IdentitySession identitySession;
        public void createUser() throws IdentityException

      but i got an IllegalAccesException; post relevant part of stack trace:

      Caused by: java.lang.IllegalAccessException: Class org.jboss.seam.solder.reflection.Reflections can not access a member of class com.mycompany.domain.entity.security.IdentityObject with modifiers "private"
              at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65) [:1.6.0_21]
              at java.lang.reflect.Field.doSecurityCheck(Field.java:960) [:1.6.0_21]
              at java.lang.reflect.Field.getFieldAccessor(Field.java:896) [:1.6.0_21]
              at java.lang.reflect.Field.set(Field.java:657) [:1.6.0_21]
              at org.jboss.seam.solder.reflection.Reflections.setFieldValue(Reflections.java:618) [:3.0.0.Final]