We are trying to migrate an application from wildfly 10.1 to 20
It consists of a core ear deployment and some wars depending on the modules deployed in the ear.
The core ear is a mixed CDI/EJB deployment.
We did NOT use CDI across the modules which was not fully supported and this was Ok for us.
So newer wildfly allowsCDI across modules, but that gets us in trouble
Our application still works upgrading to wildfly 12, but from wildfly 13+, wildfly insists in importing everything as CDI beans from the core ear to the war, trying to create new instances of the ejb and cdi beans.
We get an exception on deployment of the war:
Caused by: java.lang.IllegalArgumentException: WFLYWELD0037: Error injecting persistence unit into CDI managed bean. Can't find a persistence unit named '' in deployment mywar.war for injection point javax.persistence.EntityManager com.somecompany.SomeEJBBean.em
Basically we are struggling with the same issue described here
We already had some fun with shared classes loaded from different jars so i'm not sure the described workaround in the link is the best solution
We already tried excludes in beans.xml without effect
We do NOT use meta-inf import which is decribed to enable cross-module-CDI
Is there another way on stopping wildfly from importing CDIs from imported modules ?
What changed from wildfly 12 to 13 which breaks our application ?