Is it ok to take it from Glassfish project ( glassfish-persistence-api) or may be there is a Hibernate jar?
Java – What jar should I include to use javax.persistence package in a hibernate based application
hibernatejarjava
Related Question
- Java – Difference between FetchType LAZY and EAGER in Java Persistence API
- Java – a stack trace, and how can I use it to debug the application errors
- Java – SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”
- Java – Can’t execute jar- file: “no main manifest attribute”
- Java – Dealing with “Xerces hell” in Java/Maven
Best Solution
If you are using maven, adding below dependency should work