I\'m working on project with Servlet,JPA,EJB and JBoss in eclipse. As you can see in the title of my topic I have an error on my persistence.xml file but I don\'t know whi
Unless you didn't copy-paste the complete file, the closing tag is missing. Append
</persistence>
in your persistence.xml
EDIT
It seems that the JNDI name of your datasource is wrong. Usually it starts with :
java:/
This error means the version of Hibernate that you're using doesn't support version="2.1"
in persistence.xml. Change the version to 2.0 (and update the xsi:schemaLocation
for clarity).
Don't set a provider value.
remove
<provider>org.hibernate.ejb.HibernatePersistence</provider>
and try.
switch to
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">