Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-3556

Member variable for @UserPrincipal Annotation must be public even if there is a public getter for this member variable with @UserPrincipal Annotation

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.1.0.GA
    • Component/s: Security
    • Labels:
      None
    • Environment:

      WinXp pro / eclpise 3.4 / Jboss Server 2.4 R

      Description

      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? or is this a bug? 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 but I don't want to set my members public if there is an other way

      thx for help

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shane.bryzak Shane Bryzak
                Reporter:
                mroeoesli Marco Röösli
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: