• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No Persistence provider for EntityManager

 
ArunKumar Kandregula
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been wrestling with this error for last few days. Please someone point out where I am going wrong.

I am trying to use JPA with eclipselink. It worked fine. To check the behaviour with JPA with hibernate as persistence provider, I changed the persitence.xml and I am getting the infamous error "No Persistence provider for EntityManager named usinghibernate"

My persistence.xml


Java program:



Here is what I did to get hibernate jars : I included 2 dependencies in maven pom.xml:




In the logs, its clear that it is able to find META-INF/persistence.xml and persistence unit and again it complains that it doesnt find the persistence unit.




WARNING: Arun Could not load profiles : No Persistence provider for EntityManager named usinghibernate


Please tell me where I am missing.
I clearly have META-INF/persistence.xml on CLASSPATH and its loading.
I dont know what else it is expecting.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a typo in the <provider> element.
 
ArunKumar Kandregula
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ulf. You really saved my day. I corrected the typo and it started working as expected.

Thank you so much Ulf .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic