Hello, I am on page 76 of Java Persistence with Hibernate
and I got this exception when trying to run
Hello World app. :
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named helloworld
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at hello.HelloWorld.main(HelloWorld.java:16)
I have placed my persistence.xml in etc/META-INF
here is the content of a file
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/ ... ce_1_0.xsd"
version="1.0">
<persistence-unit name="helloworld">
<properties>
<property name="hibernate.ejb.cfgfile"
value="hibernate.cfg.xml"/>
</properties>
</persistence-unit>
</persistence>
and when i specify a programmatic configuration, i get the same exception anyway ...