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

前端 未结 9 1348
面向向阳花
面向向阳花 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:52

    Hibernate 4.3 is the first version to implement the JPA 2.1 spec (part of Java EE 7). And it's thus expecting the JPA 2.1 library in the classpath, not the JPA 2.0 library. That's why you get this exception: Table.indexes() is a new attribute of Table, introduced in JPA 2.1

提交回复
热议问题