0 Replies Latest reply on Jul 29, 2009 2:34 PM by jyothi a

    identity Store component could create

    jyothi a Newbie
      im trying to use a identity manager for authenticating username n password

      i have configured the below in component.xml file


      <security:jpa-identity-store
             user-class="com/infyz/toms/entity/Role.java"
             role-class="com/infyz/toms/entity/User.java"
             />


      my enties are

      @Entity
      @Table(name="role" ,catalog="toms_tables" )
      public class Role implements java.io.Serializable {
          private Integer roleId;
          private String name;

          @Id
          @GeneratedValue
          public Integer getRoleId() {
              return roleId;
          }

          public void setRoleId(Integer roleId) {
              this.roleId = roleId;
          }

          @RoleName
          public String getName() {
              return name;
          }

          public void setName(String name) {
              this.name = name;
          }
      }



      User.java

      @Entity
      @Table(name = "user", catalog = "toms_tables")
      public class User implements java.io.Serializable {
          private Integer userId;
          private String username;
          private String passwordHash;
          private Set<Role> roles;

          @Id
          @GeneratedValue
          public Integer getUserId() {
              return userId;
          }

          public void setUserId(Integer userId) {
              this.userId = userId;
          }

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

          public void setUsername(String username) {
              this.username = username;
          }

          @UserPassword(hash = "md5")
          public String getPasswordHash() {
              return passwordHash;
          }

          public void setPasswordHash(String passwordHash) {
              this.passwordHash = passwordHash;
          }

          @UserRoles
          @ManyToMany(targetEntity = Role.class)
          @JoinTable(name = "UserRoles", joinColumns = @JoinColumn(name = "UserId"), inverseJoinColumns = @JoinColumn(name = "RoleId"))
          public Set<Role> getRoles() {
              return roles;
          }

          public void setRoles(Set<Role> roles) {
              this.roles = roles;
          }
      }


      when i publish in the sever i m geeting error that Could not create Component: org.jboss.seam.security.identityStore


      What do i do ?