I'm using Eclipse Version: Oxygen.3 Release (4.7.3), Glassfish 5, java version 1.8.0_161, Hibernate 5.2.16 (as JPA implementation) and maven.
I'm coping with the following situation:
test1
test2
My maven project structure is as follows:
p1 (parent pom with modules)
| | |
| | Clusterer (war)
| |
| ClusterService (ejb)
|
DBClusterer (jar)
hibernate.cfg.xml and persistence.xml (which contains persistence unit "DBClusterer" cited before) are located in DBClusterer module. hibernate.cfg.xml is located in src/main/resources (which is marked as source directory in java build path). persistence.xml is located in src/main/java/META-INF (where src/main/java is marked as source directory in java build path).
I have just solved the problem. Maven wants persistence.xml to be put in main/java/resources/META-INF