Hi,
I am trying to create a simple JPA example using Java SE 5, Hibernate and MySQL.
I have created a persistence.xml and entity classes but when I run the example, I got the error-
Persistence.xml
Please let me know what is wrong with persistence.xml.
I haven't played with standalone JPA much, but shouldn't that persistence.xml have an persistence-provider element which points to the Hibernate persistence provider class? Also posting the entire exception stacktrace might also help.
Jaikiran Pai wrote:I haven't played with standalone JPA much, but shouldn't that persistence.xml have an persistence-provider element which points to the Hibernate persistence provider class?
Indeed, but if memory serves it's called "<provider>", not "persistence-provider" (unless things have changed since JPA 1.0). You'll also need "<class>" elements for all the classes that should be managed by JPA.