Excluding JPA Subsystem from JBoss EAP 6.1 - Trying to use JPA 2.1 in JBoss EAP 6.1 Excluding JPA Subsystem from JBoss EAP 6.1 - Trying to use JPA 2.1 in JBoss EAP 6.1 spring spring

Excluding JPA Subsystem from JBoss EAP 6.1 - Trying to use JPA 2.1 in JBoss EAP 6.1


We found another solution.
You can also exclude the jpa subsystem in jboss-deployment-structure.xml of the war:

<exclude-subsystems>    <subsystem name="jpa" /></exclude-subsystems><exclusions>    <module name="javaee.api" /></exclusions>


If you're Maven this did the trick for me.

<dependency>        <groupId>javax</groupId>        <artifactId>javaee-api</artifactId>        <version>7.0</version>    </dependency>

jboss-deployment-structure.xml

<deployment>    <exclude-subsystems>        <subsystem name="jpa" />    </exclude-subsystems>    <exclusions>        <module name="javaee.api" />    </exclusions></deployment>


Found a solution that seems to work with hibernate-core-4.3.1.

Step 1: remove subsystem jpa from standalone.xml:

    <subsystem xmlns="urn:jboss:domain:jpa:1.1">        <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>    </subsystem>

Thanks to this blog article:http://mariemjabloun.blogspot.nl/2014/02/jboss-eap-6-persistence-unit-problem.html

Step 2: exclude jpa, javaee modules in jboss-deployment-structure.xml of the war:

    <exclusions>        <module name="javax.persistence.api"/>        <module name="javaee.api"/>    </exclusions>