File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

provider tag in persistence.xml

 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying to make a sample using Spring3 and JPA2. The persistence provider is Hibernate.
It might be a Spring-related issue, but I'm not sure, so I ask here first.

My persistence.xml was looking like this :

I was getting the following error :


I solved it by adding the provider tag in persistence.xml :


Why doesn't it work without the provider tag ? The hibernate documentation says:
The provider is a fully-qualified class name of the EJB Persistence provider. You do not have to define it if you don't work with several EJB3 implementations. This is needed when you are using multiple vendor implementations of EJB Persistence.
.
I'm using a standalone application, so I don't think that I need to set the provider tag. Or could it be that I have several providers on my classpath ?
 
Matt Kirk
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christophe,

Did you ever get an answer on this topic?

Thanks,
Matt
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic