If you are using Jboss 7.1.1, jboss already hashttp://stackoverflow.com/questions/26616723/java-lang-nosuchmethoderror-javax-persistence-table-indexesljavax-persistenc
hibernate-jpa-2.0in its classpath, so during runtime it uses the one in its classpath, not the one you've deployed with your app , to point jboss to the
hibernate-jpa-2.1do the following:
hibernate-jpa-2.1-api-1.0.0.final.jarto the following directory :
module.xmland change the resource-root as follows :
resource-root path="hibernate-jpa-2.1-api-1.0.0.final.jar"(pointing it to jpa 2.1)
- re-compile and re-deploy your app, then you are good to go.