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

前端 未结 9 1126
面向向阳花
面向向阳花 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 15:00

    I could solve the issue simply by replacing the JPA api jar file which is located jboss7/modules/javax/persistence/api/main with 'hibernate-jpa-2.1-api'. also with updating module.xml in the directory.

    0 讨论(0)
  • 2020-11-22 15:01

    I update my Hibernate JPA to 2.1 and It works.

    <dependency>
        <groupId>org.hibernate.javax.persistence</groupId>
        <artifactId>hibernate-jpa-2.1-api</artifactId>
        <version>1.0.0.Final</version>
    </dependency>
    
    0 讨论(0)
  • 2020-11-22 15:11

    i have experienced same issue in my spring boot application. after removing manually javax.persistance.jar file from lib folder. issue was fixed. in pom.xml file i have remained following dependency only

      <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
      </dependency>
    
    0 讨论(0)
提交回复
热议问题