I have a very simple class called Role shown below:
Code:
package myapp.security;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import org.jboss.seam.annotations.security.management.RoleName;
@Entity
public class Role {
private Integer id;
private String rolename;
@Id
@GeneratedValue
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@RoleName
public String getRolename() {
return rolename;
}
public void setRolename(String rolename) {
this.rolename = rolename;
}
}
When I deploy the EAR on JBoss AS, I get the following exception:
Code:
Problem starting service persistence.units:ear=myapp-1.0-SNAPSHOT.ear,unitName=myappDatabase
org.hibernate.AnnotationException: No identifier specified for entity: myapp.security.Role
Clearly, I have an identifier defined. What am I missing?