Most of the time you will find JPA’s auto scan mechanism for annotated entities very limited. It only scans paths starting from parent of classpath:META-INF/ folder from which persistence.xml is loaded. If you want to use persistence.xml file located in a different place, for example in a jar, your annotated entities won’t be scanned because […]