0

I have created a project using maven. I have also created two child modules of this project. The structure is like this :

--parentModule --childModule-backend --childModule-frontend

The application server i have is wildfly 12. I have defined the datasource in the application server. The backend module contains the persistence.xml file. To use the backend module inside the frontend module I have declared it as a dependency in the pom file. The problem is that the war file requires the persistence.xml file and the application is not started successfully. The following exception is thrown :

 Caused by: java.lang.IllegalArgumentException: WFLYWELD0037: Error injecting persistence unit into CDI managed bean. Can't find a persistence unit named 'org.jbpm.domain' in deployment child-module-frontend.war

If I define the persistence.xml file under /resources/META-INF folder everything works. Can someone help me?. I dont want to have persistence.xml file in both modules. I want to have it only in the backend module

Nana
  • 55
  • 8

0 Answers0