Reputation: 12436
I have a Hibernate running in my project and I am trying to set it up to be switchable to EclipseLink. I have added all EclipseLink classes in Maven, but it seems that they are not running at all. When I try to run the project, it ends up with:
Exception in thread "main" javax.persistence.PersistenceException:
No Persistence provider for EntityManager named test
My persistence.xml file: https://gist.github.com/1676280
The pom.xml file with the dependencies: https://gist.github.com/1676282
Once I switch the providers in the persistence.xml back to Hibernate, everything works correctly.
Upvotes: 0
Views: 475
Reputation: 171
I see one significant issue and a couple of minor problems in your persistence.xml.
The big issue is the your persistence unit is named "org.knyttl" but the error message says persistence unit "test" can't be found. If you're looking for "test" and the pu is "org.knyttl" then you're not going to find anything. :)
The minor issues are that you have a couple of the EclipseLink properties misnamed. "javax.persistence.target-database" should be "eclipselink.target-database" and "javax.persistence.logging.level" should be "eclipselink.logging.level".
Shaun
Upvotes: 2