No Persistence provider from dependency [message #533511] |
Fri, 14 May 2010 07:14  |
Eclipse User |
|
|
|
Hi,
I have two Plug-in projects, the first one defines a bunch of Entities of a database I need to deal of, and from this project (from it's tests) everything works nicely (ie: Query de DB).
Then I created project 2 which provides some UI to deal with some stuff and depends on the first project (to Query it's DB). I added the project as plugin dependencies of project 2.
But, when I called createEntityManagerFactory() I got that nice error:
"javax.persistence.PersistenceException: No Persistence provider for EntityManager named xxxxxxxxxxxx"
I've being googling around for a while (two days) but all the solutions I found did not apply. Among other things I tried to copy the persistence.xml file from project1 to project2/META-INF, project2/src/META-INF and the bin/ folder with no luck.
Do you have anyclues on what may I be doing wrong?
Thanks a lot.
|
|
|
Re: No Persistence provider from dependency [message #534169 is a reply to message #533511] |
Tue, 18 May 2010 05:32  |
Eclipse User |
|
|
|
Ok, I fixed this after reading this thread:
I copy the relevant part here (that things are to be done in the RUN CONFIGURATIONS screen):
Try the following.
- Set a default start level of 5.
- We need the javax.persistence bundle to start at first, so set a
startlevel of 3.
- Next org.eclipse.persistence.jpa should be started -> start level 4
- Leave all the rest at startlevel 5.
Have a look for the following output on the osgi console:
2009-10-09 10:25:11,328 INFO [STDOUT] Persistence bundle starting...
2009-10-09 10:25:11,329 INFO [STDOUT] Persistence bundle started.
2009-10-09 10:25:25,565 INFO [STDOUT] ProviderTracker: New service detected...
2009-10-09 10:25:25,565 INFO [STDOUT] ProviderTracker: Added service org.eclipse.persistence.jpa.osgi.PersistenceProviderOSGi
If you don't see the output, make sure you set the -console -consolelog
arguments in the launch configurations. If you still don't see it,
you've at least identified the problem, the PersistenceProvider service
is not registered.
|
|
|
Powered by
FUDForum. Page generated in 0.03424 seconds