3 Replies Latest reply on Nov 15, 2008 11:34 PM by Ingo Jobling

    Seam Identity - Annotation on field requires public modifier?

    Ingo Jobling Master

      I cannot use Seam Identity annotations, for example, @PermissionTarget, on a field unless it has been declared with the public modifier.  On fields with private or protected modifier, I get the following exception:


      Caused by: java.lang.IllegalArgumentException: exception setting: target
           at org.jboss.seam.util.Reflections.setAndWrap(Reflections.java:129)
           at org.jboss.seam.util.AnnotatedBeanProperty.setValue(AnnotatedBeanProperty.java:99)
           at org.jboss.seam.security.permission.JpaPermissionStore.updatePermissionActions(JpaPermissionStore.java:370)
           ... 95 more
      Caused by: java.lang.IllegalAccessException: Class org.jboss.seam.util.Reflections can not access a member of class org.agritrace.model.security.Permission with modifiers "private"
           at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
           at java.lang.reflect.Field.doSecurityCheck(Field.java:960)
           at java.lang.reflect.Field.getFieldAccessor(Field.java:896)
           at java.lang.reflect.Field.set(Field.java:657)
           at org.jboss.seam.util.Reflections.set(Reflections.java:71)
           at org.jboss.seam.util.Reflections.setAndWrap(Reflections.java:119)
           ... 97 more