The persistence.xml file must be in a specification-recognized location

A Java Persistence API (JPA) persistence unit is defined by a persistence.xml file. The persistence.xml file must be located in the META-INF directory of the root of the persistence unit as defined by the JPA specification.

Refer to the JPA 2.1 specification for more details on the JPA feature.