[jboss-jira] [JBoss JIRA] (WFLY-5042) Two persistence.xml in two EJB projects within one EAR don't work

Martin Rauscher (JIRA) issues at jboss.org
Fri Jul 31 09:02:02 EDT 2015


Martin Rauscher created WFLY-5042:
-------------------------------------

             Summary: Two persistence.xml in two EJB projects within one EAR don't work 
                 Key: WFLY-5042
                 URL: https://issues.jboss.org/browse/WFLY-5042
             Project: WildFly
          Issue Type: Bug
          Components: JPA / Hibernate
    Affects Versions: 9.0.0.Final
            Reporter: Martin Rauscher
            Assignee: Scott Marlow


We have an EAR containing a JAR in /lib and two EJBs and one WAR each referencing the JAR. The rest of the dependencies is: WAR->EJB1->EJB2.

If each of the EJB JARs has its own persistence.xml the EAR cannot be deployed anymore to WildFly. (It worked on WebSphere)

This works fine as long as no persistence.xml exists. As soon as each EJB gets its own persistence.xml (in our full project they point to different DSs) we're not able to deploy anymore.

Wildfly doesn't seem to be able to resolve dependencies between modules as soon as there are two persistence.xml's. Despite the (repro) project doesn't even use it (yet). If you remove the persistence.xml's the project works fine. From the error (see below) it looks like the services defined in EJB1 try to use the persistence unit defined in EJB2 despite there not being any kind of reference.

Repro on [GitHub|https://github.com/Hades32/wildfly-issues].
Forum discussion [here|https://developer.jboss.org/thread/261445], including logs.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list