3 Replies Latest reply on May 3, 2010 6:00 PM by Joshua D

    Illegal Access Exception while evaluating permissions using s:hasPermission

    Joshua D Novice
      Env: Seam 2.2.0, JBoss 5.1

      I get this error occasionally even though the user permission class is configured properly. Has anyone seen this error before (Note: This happens while rendering the main page which contains a lot of permission checks to show tab items as per login credentials)

      --------------------------------

      java.lang.IllegalAccessException with message: "Class org.jboss.seam.util.Reflections can not access a member of class com.mycompany.model.UserPermission with modifiers "private""
      sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
      java.lang.reflect.Field.doSecurityCheck(Field.java:960)
      java.lang.reflect.Field.getFieldAccessor(Field.java:896)
      java.lang.reflect.Field.get(Field.java:358)
      org.jboss.seam.util.Reflections.get(Reflections.java:53)
      org.jboss.seam.util.Reflections.getAndWrap(Reflections.java:96)
      org.jboss.seam.util.AnnotatedBeanProperty.getValue(AnnotatedBeanProperty.java:111)
      org.jboss.seam.security.permission.JpaPermissionStore.listPermissions(JpaPermissionStore.java:713)
      org.jboss.seam.security.permission.JpaPermissionStore.listPermissions(JpaPermissionStore.java:607)
      org.jboss.seam.security.permission.PersistentPermissionResolver.hasPermission(PersistentPermissionResolver.java:80)
      org.jboss.seam.security.permission.PermissionMapper.resolvePermission(PermissionMapper.java:80)
      org.jboss.seam.security.Identity.hasPermission(Identity.java:632)