This content has been marked as final.
Show 6 replies
-
1. Re: annotation @UserPrincipal can not add to a field
shane.bryzak Oct 13, 2008 2:47 AM (in response to stenlylee)I'm pretty sure this is fixed in SVN trunk.
-
2. Re: annotation @UserPrincipal can not add to a field
mroeoesli Oct 13, 2008 12:48 PM (in response to stenlylee)I am useing the last update from SVN but I have an other problem, I can't add @UserPrincipal just to a public getter Method.
My Entity:
.... @Column(name = "USERNAME", length = 16, nullable = false, unique = true) private String username; @UserPrincipal public String getUsername() { return username; }
With this code above i get this Error:
Caused by: java.lang.IllegalAccessException: Class org.jboss.seam.util.Reflections can not access a member of class ch.pomop.dummy.security.UserAccount with modifiers "private" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65) at java.lang.reflect.Field.doSecurityCheck(Field.java:954) at java.lang.reflect.Field.getFieldAccessor(Field.java:895) at java.lang.reflect.Field.get(Field.java:357) at org.jboss.seam.util.Reflections.get(Reflections.java:51) at org.jboss.seam.util.Reflections.getAndWrap(Reflections.java:88) ... 83 more
Is it necessary to set the members public?
As i changed the my Entity Code to:
My Entity:
@UserPrincipal @Column(name = "USERNAME", length = 16, nullable = false, unique = true) public String username; }
it worked!
If there is a possiblity to not set my members public I would be happy to know it
Thx for your help!greetz Marco
-
3. Re: annotation @UserPrincipal can not add to a field
shane.bryzak Oct 14, 2008 1:29 AM (in response to stenlylee)Can you please raise this in JIRA?
-
4. Re: annotation @UserPrincipal can not add to a field
mroeoesli Oct 14, 2008 9:36 AM (in response to stenlylee) -
5. Re: annotation @UserPrincipal can not add to a field
shane.bryzak Oct 14, 2008 9:46 AM (in response to stenlylee)That's the wrong project, it needs to go under Seam.
-
6. Re: annotation @UserPrincipal can not add to a field
mroeoesli Oct 14, 2008 12:44 PM (in response to stenlylee)