I have a war application which contains JPA 2.1 API and Hibernate 4.3.0.Final ( JPA 2.1 implementation) packaged and bootstrapped using Spring container and I want to deploy th
The above answers are great, but they are introducing other problems in many applications by excluding the whole Java EE API.
If you don't want to do so, then go to JBOSS_HOME\modules\javaee\api\main\module.xml
and set export to false for javax.persistence.api
, like this:
Note that this will disable the persistence API for every application deployed in the same EAP.
You still need to delete the JPA subsystem from standalone.xml
, but you don't need to change jboss-deployment-structure.xml
, or at least I didn't have to.