Invalid persistence.xml ... Error parsing XML in JBoss EAP

Solution Verified - Updated -


Encountering the below after modifications to the persistence.xml

... javax.persistence.PersistenceException: Invalid persistence.xml.
Error parsing XML [line : -1, column : -1] : cvc-elt.1.a: Cannot find the declaration of element 'persistence'.

    at org.hibernate.jpa.boot.internal.PersistenceXmlParser.validate(
    at org.hibernate.jpa.boot.internal.PersistenceXmlParser.loadUrl(
    at org.hibernate.jpa.boot.internal.PersistenceXmlParser.parsePersistenceXml(
    at org.hibernate.jpa.boot.internal.PersistenceXmlParser.parsePersistenceXml(
    at org.hibernate.jpa.boot.internal.PersistenceXmlParser.doResolve(
    at org.hibernate.jpa.boot.internal.PersistenceXmlParser.locatePersistenceUnits(
    at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(


  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • Hibernate 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content