I'm using EclipseLink as the JPA provider but on calling:
Persistence.createEntityManagerFactory("emfactory1")
I get this exception:
java.lang.ClassNotFoundException: javax.persistence.Persistence
The pom.xml
file reads as follows:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.6.4</version>
</dependency>
On looking around I found a suggestion to fetch only the JPA API:
<artifactId>javax.persistence</artifactId>
But that still gives me the same exception. Suffice to say I'm now stranded and in need of assistance.
Edit