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

后端 未结 4 756
清酒与你
清酒与你 2021-02-08 05:08

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

4条回答
  •  野的像风
    2021-02-08 05:49

    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.

提交回复
热议问题