I am using hibernate JPA on tomcat. I created a connection pool on tomcat and it works fine independently. Now for my JPA to use this connection pool ; I created persistence.xml as follows:
<?xml version="1.0"?>
<persistence>
<persistence-unit name="kids" transaction-type="JTA">
<jta-data-source>jdbc/kids</jta-data-source>
</persistence-unit>
</persistence>
It is giving me following exception:
javax.persistence.PersistenceException: Invalid persistence.xml.
Error parsing XML (line-1 : column -1): cvc-elt.1: Cannot find the declaration of element ‘persistence’.
Please help.
Maybe you should set the namespace attribute and the schema location for the persistence node: