Interestingly enough, we just stumbled across a similar issue while upgrading an application from EAP6.4 (WELD 1.1.28.Final) to EAP 7.1 (WELD 2.4.3.Final) The same setup works with WELD 1.1.28 (EAP6.4) but throws the exact error from above in WELD 2.4.3.Final (see my flavour of the error below) (sorry, log is in German, but this IS the same error) Caused by: java.lang.IllegalArgumentException: WFLYWELD0037: Fehler beim Einspeisen der Persistenzeinheit in ein CDI-verwaltetes Bean. Es kann keine Persistenzeinheit mit dem Namen "redacted.bpm.migra-PU" in Deployment Umschuldung-1.0.2.jar für Einspeisungspunkt protected javax.persistence.EntityManager com.redacted.bpe.jmx.uc4.BatchMessageServiceBean.entityManager gefunden werden So: 1) PU is in ejb-jar. That whole EJB-ear (and the ejb-jar within it) work fine alone. 2) Now I'm deploying a jar with a jboss-deployment-stucture.xml - dependency on the ear (and the ejb-jar) that wants to inject the PU and it fails. The same setup (no change) worked in EAP6.4. Funny, huh? Well, not so funny for me. Thinking about bundling the jar(s) - there's a huge number of them - into the ear and moving the PU (the persistence.xml up from the ejb-jar to the ear-level) Thoughts? |