• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic