No persistence units parsed from {classpath*:META-INF/persistence.xml} No persistence units parsed from {classpath*:META-INF/persistence.xml} spring spring

No persistence units parsed from {classpath*:META-INF/persistence.xml}


This usually means that Spring can't find persistence.xml.

Make sure that persistence.xml is in META-INF in relation to your classpath.

This might mean you have to put the file in WEB-INF\classes\META-INF, even though it seems strange.


If you are using Maven the META-INF folder should be placed within src/main/resources, once the file be there the problem is gone.


Are you config packagesToScan property in entityManagerFactory bean?