Exclude JPA 2.0 from JBoss 7.1 in order to use hibernate 4.3
问题 I want to use hibernate 4.3 for its multitenancy features in JBoss 7.1. I managed to include it in my war by adding the following lines in jboss-deployment-structure <exclusions> <module name="org.hibernate" /> </exclusions> and adding a dependency to hibernate core and entity manager in my pom.xml This made hibernate 4.3 to load but unfortunately I got an error java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index; which is due to JPA 2.0 being loaded when