Guys,
Environment Details
Netbeans 6.5
Glassfish V2 ur2
Toplink
Oracle thin JDBC driver
JAVA EE application
I am getting the following error:
root cause
javax.persistence.PersistenceException: No Persistence provider for EntityManager named myapp-ejbPU: The following providers:
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
oracle.toplink.essentials.PersistenceProvider
Returned null to createEntityManagerFactory.
persistence.xml file...
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" 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">
<persistence-unit name="myapp-ejbPU" transaction-type="JTA">
<jta-data-source>mydatasource</jta-data-source>
<properties/>
</persistence-unit>
</persistence>
also mydatasource pings fine...and I also executed some queries just fine...
this is how I am creating the entity manager...
public EntityManager getEntityManager() {
if (emf == null) {
emf = Persistence.createEntityManagerFactory("myapp-ejbPU");
}
return emf.createEntityManager();
}
What am I missing...please suggest...
-Amor
[Message sent by forum member 'amorous' (amorous)]
http://forums.java.net/jive/thread.jspa?messageID=326620