Redeploy dependent ear/war fails with duplicate resource error for persistence unit in JBoss EAP 6.4
Issue
We have an EAR which depends on a WAR. If we undeploy the WAR and then redeploy it, an exception is thrown:
Caused by: java.lang.IllegalStateException: JBAS014666: Recurso duplicado incluso myear.ear/myejb.jar#perunit
EAR jboss-all.xml configuration:
<jboss umlns="urn:jboss:1.0">
<jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0">
<dependency name="mywar.war" />
</jboss-deployment-dependencies>
</jboss>
Environment
Red Hat JBoss Enterprise Application Platform (EAP) 6.4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
