Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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.
 
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.
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic