If you are using maven. You can add this to your pom.xml:
<dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> <version>1.0.2</version> </dependency>
Alternatively, you can download the jar file directly from the maven repository here , then add it to the classpath. By the way, @Table(name = "table_name") not supported. You should replace it with @Entity(name="table_name") .
Thunder
source share