This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPA data access with REST API  RSS feed

 
priyanshi bhardwaj
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ERROR:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: No identifier specified for entity: com.example.jpamavenrest.Entity.Users
how to solve this



 
Dana Ucaed
Ranch Hand
Posts: 389
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What IDE did you use?

I used NetBeans 8.2 to create a REST service from database and was Ok.
 
Ted Young
Greenhorn
Posts: 9
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the code for your Repository class? It's hard to tell what's wrong without it. I created what I think you needed for your Repository and you can find the working code at this GitHub repo:

https://github.com/tedyoung/spring-boot-user-rest-jpa

;ted
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!