Hi everybody,
I'd like to create one Bundle that is able to use Java Persistence. To achieve this, I've created a plugin project within Eclipse. In my project, I've created a persistence.xml file into META-INF. I've aslo added in my MANIFEST.mf (into the depencies) those 3 packages :
- javax.persistence.jar
- org.eclipse.persistence.jar
- org.eclipse.persistence.jar
Then, in my Activator I use this lines to create an EntityManager :
factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
EntityManager em = factory.createEntityManager();
To execute my bundle, I've made a product configuration. When I run my product configuration, I got this error : javax.persistence.PersistenceException: No Persistence provider for EntityManager named people
I've tried to move the location of my persistence.xml withtout succes. It seems that any package load the persistence.xml file. Maybe, I don't import the right packages?
You can download my simple Bundle here : download
Could you help me to find a solution or a clue?
Thanks you very much,
Bat