title: Can not find the declaration of element 'persistence'
body: <p>Have put the persistence.xml in the classpath of the project in eclipse
  because before the error was that the file was not found.
  Now gives this error:</p>
  
  <blockquote>
    <p>Caused by: javax.persistence.PersistenceException: Invalid
    persistence.xml. Error parsing XML [line : -1, column : -1] :
    cvc-elt.1: Can not find the declaration of element 'persistence'</p>
  </blockquote>
  
  <pre><code>&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1"
               xsi:schemalocation="http://java.sun.com/xml/ns/persistence
                                   http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd"&gt;
      &lt;persistence-unit name="default" transaction-type="RESOURCE_LOCAL"&gt;
          &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
          &lt;properties&gt;
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" /&gt;
              &lt;property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/Automoveis" /&gt;
              &lt;property name="javax.persistence.jdbc.user" value="postgres" /&gt;
              &lt;property name="javax.persistence.jdbc.password" value="1234" /&gt;
              &lt;property name="javax.persistence.jdbc.driver" value="org.postgresql.jdbc.Driver" /&gt;
              &lt;property name="hibernate.show_sql" value="true" /&gt;
              &lt;property name="hibernate.format_sql" value="true" /&gt;
              &lt;property name="hibernate.hbm2ddl.auto" value="create" /&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>