Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named JPA2: The following providers: oracle.toplink.essentials.PersistenceProvider oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider Returned null to createEntityManagerFactory. at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
I am not sure I config everything right and I doubt it's prohibited by the spec. I'd appreciate any help.
You need to use an application managed entity manager: Inject an entity manager factory using @PersistenceUnit and create the entity manager via the entity manager factory's createEntityManager() method. Don't forget to set transaction-type="RESOURCE_LOCAL" in the persistence.xml file.
SCJP 5 (98%) - SCBCD 5 (98%)
Mellon Sun
Ranch Hand
Posts: 126
posted 12 years ago
I did what you say.
OK, I believe you proved I am right. I have to go on for the exam, I am running out of the time.
Thank you. [ December 20, 2008: Message edited by: Mellon Sun ]
SCJP,SCWCD1.3,SCWCD1.4,SCJD,SCBCD5,SCEA5
I am a man of mystery. Mostly because of this tiny ad: