Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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: 531
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!