Error: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey with Spring controller

后端 未结 4 478
没有蜡笔的小新
没有蜡笔的小新 2020-12-07 00:21

I have a simple two table application written in Spring MVC and which uses Hibernate. Everything works perfectly well but if I try to unit test one of the controllers, I get

4条回答
  •  [愿得一人]
    2020-12-07 01:11

    I finally solved this similar problem, there was an old version(hibernate-jpa-2.0-api-1.0.0-Final.jar) in my lib folder which I guess has been preventing maven dependency from loading.

    So after I manually deleted it and added (hibernate-jpa-2.1-api-1.0.0-Final.jar) everything started to work.

提交回复
热议问题