BloggerAds

2017年5月4日 星期四

JPA Error Code: java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;

From: Polin Wei



If you are using Jboss 7.1.1, jboss already has hibernate-jpa-2.0 in 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.1 do the following:
  1. copy hibernate-jpa-2.1-api-1.0.0.final.jar to the following directory : jboss-as-7.1.1.Final/modules/javax/persistence/api/main
  2. open module.xml and 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)
  3. re-compile and re-deploy your app, then you are good to go.
http://stackoverflow.com/questions/26616723/java-lang-nosuchmethoderror-javax-persistence-table-indexesljavax-persistenc

(繼續閱讀...)

沒有留言:

張貼留言