0 Replies Latest reply on Jun 3, 2009 1:06 PM by Edem Morny

    Error configuring JpaIdentityStore

    Edem Morny Novice

      I have a problem using Seam's JpaIdentityStore in seam 2.1.1.GA for identity management.

      I have a User class annotated as following

      public class UserImpl extends UniqueIDImpl implements User{
          private static final long serialVersionUID = -7547331292683799836L;
          private String firstName;
          private String lastName;
          private String username;
          private String password;
          @JoinTable(name="user_role",joinColumns = {@JoinColumn(name = "user_id")},
                          inverseJoinColumns = {@JoinColumn(name = "role_id")})
          private Set<Role> roles = new HashSet<Role>();

      And Roles also as ff:

      public class RoleImpl extends UniqueIDImpl implements Role{
          private static final long serialVersionUID = -7189583948477718346L;
          private String rolename;  

      You will notice that because I'm implementing from defined interfaces, I had to specify the targetEntity on the ManyToMany relationship and declare annotations on fields and not on properties (get/sets) as I'd have liked to do, simple because I had exceptions otherwise.

      I have specified these in the components.xml file as ff

      <security:jpa-identity-store user-class="com.domain.model.security.UserImpl"

      Somehow, I'm unable to login, though I'm able to create user accounts which are sitting comfortably in the database. I decided to test my configuration by calling

      IdentityManager.instance().createUser("michael", "essien");

      And I get the following exception among other exceptions.

      Caused by org.jboss.seam.security.management.IdentityManagementException with message: Error configuring JpaIdentityStore - it looks like you're using a cross-reference table, however the user property cannot be determined.

      Any ideas what I'm doing wrong?