Java – eclipse link: there is no persistence provider named entitymanager
I want to create a bundle that can use Java persistence To do this, I created a plug - in project in eclipse In my project, I have created a persistence. Inf in meta - inf XML file I've been in my manifest MF (add dependency) adds these three packages:
> javax. persistence. jar > org. eclipse. persistence. jar > org. eclipse. persistence. jar
Then, in my activator, I use these lines to create an entitymanager:
factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME); EntityManager em = factory.createEntityManager();
In order to perform my bundle, I have configured the product When I run my product configuration, I receive this error:
I tried to move my persistence XML location, but failed It seems that any package is loaded with persistence XML file Maybe I didn't import the correct package?
You can download my simple package here: Download
Can you help me find a solution or clue?
Solution
I have solved my problem I just need to put the class path of this package in the list:
thank you