NoSuchMethodError in javax.persistence.Table.indexes()[Ljavax/persistence/Index

前端 未结 9 1124
面向向阳花
面向向阳花 2020-11-22 14:40

I have a Play Framework application and I was using Hibernate 4.2.5.Final (which is retrieved via the Maven dependency manager). I decided to upgrade to Hibernate

9条回答
  •  囚心锁ツ
    2020-11-22 14:56

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

    The only thing that solved my problem was removing the following dependency in pom.xml: org.hibernate.javax.persistence hibernate-jpa-2.1-api 1.0.0.Final

    And replace it for:

    
      javax.persistence
      persistence-api
      1.0.2
    
    

    Hope it helps someone.

提交回复
热议问题