java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()

前端 未结 4 981
天涯浪人
天涯浪人 2021-01-05 19:54

I have a maven project that uses spring, hibernate (3.6.4), GWT(2.3), drools,.... Everything used to work fine till I began using hibernate OneToMany, ManyToMany relations..

4条回答
  •  一整个雨季
    2021-01-05 20:30

    We had the exact same problem and outputting OneToMany.class.getProtectionDomain().getCodeSource().getLocation() showed us the problem. We were picking up ejb3 JAR due to a stale dependency in our pom. Thank you very much for posting this solution!

    By the way, remember to run mvn eclipse:eclipse if you're using Eclipse, else the .classpath will still refer to the unwanted JAR.

提交回复
热议问题