• 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

javax.persistence.Entity doesn't exists

 
Ranch Hand
Posts: 38
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[size=12]Hi,

I looked at this tutorial: https://spring.io/guides/gs/accessing-data-jpa/

and I wrote a class with the statement:


I don't know why, but I get an Error that "Entity" doesn't exist in javax.persistence package.

I also added the following dependencies to Maven:



and it still didn't help.

By the way, I also asked this question on Stack Overflow:
http://stackoverflow.com/questions/43832705/spring-boot-does-entity-annotation-exist
http://stackoverflow.com/questions/43833662/javax-persistence-entity-doesnt-exist?noredirect=1#comment74705247_43833662

and I haven't got a satisfying answer so far.

I'll be grateful for your help.

[/size]
 
author & internet detective
Posts: 41905
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for linking to your other post. It lets us see that you resolved the problem by running Maven update.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just add the following depedency  in the pom.xml

   <dependency>
           <groupId>javax.persistence</groupId>
           <artifactId>javax.persistence-api</artifactId>
       </dependency>

IT WORKED FOR ME in spring boot

 
reply
    Bookmark Topic Watch Topic
  • New Topic