Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » No Persistence provider from dependency
No Persistence provider from dependency [message #533511] Fri, 14 May 2010 07:14 Go to next message
Marc Fargas is currently offline Marc Fargas
Messages: 22
Registered: May 2010
Junior Member
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 Go to previous message
Marc Fargas is currently offline Marc Fargas
Messages: 22
Registered: May 2010
Junior Member
Embarrassed
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.
Previous Topic:Implementing aggregate boolean functions in JPQL?
Next Topic:[ANN] EMFT Texo: generating pure pojos and the ORM from ecore/xsd models
Goto Forum:
  


Current Time: Thu Aug 21 16:17:22 EDT 2014

Powered by FUDForum. Page generated in 0.01700 seconds