• Post Reply Bookmark Topic Watch Topic
  • New Topic

org. hibernate. Annotation Exception: Unknown Id.generator  RSS feed

Pramod Kumar
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have my persistance.xml and orm.xml in META-INF folder and both are in classpath in war.


<persistence-unit name="oamconsole">

I have my mapped class files here

I have my DB properties here.


<sequence-generator name="USER_SEQ" sequence-name="USER_SEQ" />

I have more sequence generators here.
I have named queries here.

finally the user class

@Column(name = "USER_ID")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "USER_SEQ")
public Long getInternalId() {
return internalId;

I got the following exception. What would be the problem?

javax.persistence.PersistenceException: org.hibernate.AnnotationException: Unknown Id.generator: USER_SEQ

I have this sequence created in my db I am not able to find what is the problem?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!