[seam-issues] [JBoss JIRA] Updated: (JBSEAM-4578) CLONE - at UserPrincipal doesn't work when used in variable declaration.

Stephanie Stroka (JIRA) jira-events at lists.jboss.org
Wed Mar 3 08:15:10 EST 2010


     [ https://jira.jboss.org/jira/browse/JBSEAM-4578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephanie Stroka updated JBSEAM-4578:
-------------------------------------

    Affects Version/s: 2.2.0.CR1
                           (was: 2.1.0.SP1)
          Description: 
Related to https://jira.jboss.org/jira/browse/JBSEAM-3556

1) Make this change in class MemberAccount.java into seam-space example 


   @NotNull @UserPrincipal
   private String username;

   ..........

   //@NotNull @UserPrincipal
   public String getUsername()
   {
      return username;
   }


2) No explicit error message, but: 
When querying the Memberaccount, the reflection on the field username does return null, even if a username exists. When the annotation is placed on the getter method (getUsername()), reflection works fine.

  was:
Related to https://jira.jboss.org/jira/browse/JBSEAM-3556

1) Make this change in class MemberAccount.java into seam-space example 


   @NotNull @UserPrincipal
   private String username;

   ..........

   //@NotNull @UserPrincipal
   public String getUsername()
   {
      return username;
   }


2) deploy, register a new user and try to login.

java.lang.IllegalAccessException: Class org.jboss.seam.util.Reflections can not access a member of class org.jboss.seam.example.seamspace.MemberAccount 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.set(Field.java:657)
	org.jboss.seam.util.Reflections.set(Reflections.java:71)
	org.jboss.seam.util.Reflections.setAndWrap(Reflections.java:119)
	org.jboss.seam.util.AnnotatedBeanProperty.setValue(AnnotatedBeanProperty.java:99)
	org.jboss.seam.security.management.JpaIdentityStore.createUser(JpaIdentityStore.java:207)
	org.jboss.seam.security.management.IdentityManager.createUser(IdentityManager.java:98)
	org.jboss.seam.security.management.IdentityManager.createUser(IdentityManager.java:92)
	org.jboss.seam.example.seamspace.RegisterAction$1.execute(RegisterAction.java:104)
	org.jboss.seam.security.Identity.runAs(Identity.java:734)
	org.jboss.seam.security.RunAsOperation.run(RunAsOperation.java:84)
	org.jboss.seam.example.seamspace.RegisterAction.uploadPicture(RegisterAction.java:102)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	org.jboss.seam.util.Reflections.invoke(Reflections.java:22)





> CLONE - at UserPrincipal doesn't work when used in variable declaration.
> ---------------------------------------------------------------------
>
>                 Key: JBSEAM-4578
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4578
>             Project: Seam
>          Issue Type: Bug
>          Components: Security
>    Affects Versions: 2.2.0.CR1
>            Reporter: Stephanie Stroka
>            Assignee: Shane Bryzak
>
> Related to https://jira.jboss.org/jira/browse/JBSEAM-3556
> 1) Make this change in class MemberAccount.java into seam-space example 
>    @NotNull @UserPrincipal
>    private String username;
>    ..........
>    //@NotNull @UserPrincipal
>    public String getUsername()
>    {
>       return username;
>    }
> 2) No explicit error message, but: 
> When querying the Memberaccount, the reflection on the field username does return null, even if a username exists. When the annotation is placed on the getter method (getUsername()), reflection works fine.

-- 
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