I'm working through the examples in the book "Java Persistence with Hibernate". I've created a JPA probject as a
Java project in Eclipse with all the necessary dependencies set up.
According to the book, one should be able to place a persistence.xml file in the META-INF directory of the classes root directory and have the Persistence class find it when it's time to build the EntityManager. However, this just does not seem to work for me. Any ideas? Below is my code:
persistence.xml in META-INF When I try to exeute the statement:
I get the error:
Exception in
thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named helloworld
I'm running this from Eclipse.