This stumped me for a long time and I couldn't find it referenced anywhere. I finally traced through the source. I kept getting this error:
"No Persistence provider for EntityManager named your-name-here"
It turns out I was using a namespace prefix for my persistence tags (assume namespace p is defined); i.e.
Code:
<p:persistence-unit name="pu">...</p:persistence>
Even though the XML is valid Hibernate cannot "see" these elements and throws the exception. I was able to resolve this by setting the default namespace: xmlns="http://java.sun.com/xml/ns/persistence" and then removing the namespace prefix from all my tags.
More accurately PersistenceXmlLoader.deploy() is trying to match a localName to a possibly qualifiedName.