[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3511) User Entity Annotations not working on private fields.
Ton Rijssen (JIRA)
jira-events at lists.jboss.org
Sun Oct 5 16:56:20 EDT 2008
User Entity Annotations not working on private fields.
------------------------------------------------------
Key: JBSEAM-3511
URL: https://jira.jboss.org/jira/browse/JBSEAM-3511
Project: Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.1.0.CR1
Reporter: Ton Rijssen
Caused by: org.jboss.seam.security.management.IdentityManagementException: Invalid userClass nl.xxx.xxx.User - required annotation @UserRoles not found on any Field or Method.
at org.jboss.seam.security.management.JpaIdentityStore.initProperties(JpaIdentityStore.java:138)
at org.jboss.seam.security.management.JpaIdentityStore.init(JpaIdentityStore.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
When the JpaIdentityStore is initialized, the classes are checked on certain required annotations.
The AnnotatedBeanProperty's method scanForProperty is used to check these required annotations.
The annotations targets are METHOD and FIELD, and should be used in that way. (do not care about private or public identifiers)
getFields() is used to retrieve the class fields. This method only returns the public fields.
getDeclaredFields() however returns public protected and private fields.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list