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

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

    I had the same issue, I fixed it by using org.hibernate.annotations.Table annotation instead of javax.persistence.Table in the Entity class.

    import javax.persistence.Entity;
    import org.hibernate.annotations.Table;
    
    @Entity
    @Table(appliesTo = "my_table")
    public class MyTable{
    //and rest of the code
    

提交回复
热议问题