• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Org.hibernate.AnnotationException: No identifier specified for entity: <Entity Class>

 
Shankara Sharma
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have been struggling to resolve below error while executing main methoud in JAR commandline.



However when I run the same program through commandline I don't see any issue. From past couple of days I searched technical forums and tried multiple stuff but nothing worked.

As of the this discussion http://forum.spring.io/forum/spring-projects/data/64847-no-identifier-specified-for-entity ; I suspect that the issue is pertaining to hibernate dependencies. Here is maven dependency list.


Please help me in resolving this issue.
 
Anton Golovin
Ranch Hand
Posts: 527
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shankara,

Are you properly identifying the primary key in your Hibernate entity (simple or compound)? If you don't, Hibernate won't know what it is. If you're using annotations, there is a specific annotation for that; if you're using xml, there is specific xml for that.

With best regards,

Anton.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic