I have a simple JPA/Hibernate Project in Eclipse (Helios) IDE. I have placed the persistence.xml in Project>resources dir. And in Eclipse i have added this directory(Project\resources) to the classpath.
Yet when i run my appln frm within Eclipse IDE, i see this error: javax.persistence.PersistenceException: No Persistence provider for EntityManager named XX
In Eclipse, i've following Libraries: hibernate3.jar hibernate-jpa-2.0-api-1.0.0.Final.jar hibernate-entitymanager-3.6.0.Final.jar and rest are supporting jars...
My persistence.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<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/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="XX" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- the JNDI data source -->
<non-jta-data-source>java:comp/env/jdbc/tutorialDS</non-jta-data-source>
<properties>
...
</properties>
</persistence-unit>
</persistence>
What is causing this error in Eclipse IDE? Thanks