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

后端 未结 4 490
没有蜡笔的小新
没有蜡笔的小新 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:18

    If you are on JBoss EAP 6.4.x

    Chances are it came with the JPA 2.0 and you will need to manually update it to 2.1! Follow the simple steps which worked for me.

    Download the JPA 2.1 from maven repository and update the JBoss module http://mvnrepository.com/artifact/org.hibernate.javax.persistence/hibernate-jpa-2.1-api

    Copy the file into the JBoss modules directory

    Update the module.xml on the same directory

提交回复
热议问题