Note that there are some explanatory texts on larger screens.

plurals
  1. POHibernate 3.5.x: NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval
    primarykey
    data
    text
    <p>I'm trying to upgrade to Hibernate 3.5.3-FINAL.</p> <p>When running my unit tests, I now receive the following exception:</p> <pre><code>java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1837) </code></pre> <p>My classpath contains the following JAR's:</p> <p><strong>From the hibernate dist:</strong></p> <pre><code>antlr-2.7.6.jar commons-collections-3.1.jar dom4j-1.6.1.jar javassist-3.9.0.GA.jar jta-1.1.jar slf4j-api-1.5.8.jar cglib-2.2.jar hibernate-jpa-2.0-api-1.0.0.Final.jar hibernate3.jar </code></pre> <p><strong>Other jars:</strong></p> <pre><code>blazeds-common-3.2.0.3978.jar blazeds-core-3.2.0.3978.jar blazeds-opt-3.2.0.3978.jar blazeds-proxy-3.2.0.3978.jar blazeds-remoting-3.2.0.3978.jar commons-lang-2.3.jar dbunit-2.4.7.jar ejb3-persistence.jar // Note, I've tried excluding this, but I get different errors guava-r05.jar hsqldb-1.8.0.7.jar junit-4.1.jar lambdaj-2.0-with-dependencies.jar log4j-1.2.14.jar mockito-all-1.8.0.jar persistence-api-1.0.jar spring-security-core-2.0.0.jar spring.jar sqljdbc.jar </code></pre> <p>I've researched this, and I <a href="http://www.gg3721.com/list/6/618014.html" rel="noreferrer">find answers</a> that state my webserver must be JPA2 Compliant:</p> <blockquote> <p>Unfortunately if your app server is not JPA 2 compliant, you are likely to be out of luck</p> </blockquote> <p>This project is a library, not a webserver project. (Although it is eventually deployed to a webserver, I'm simply running unit tests here)</p> <p>What am I missing?</p> <p><code>&lt;indulgent_rant&gt;</code></p> <p>As a sidenote, it's very frustrating that every time I upgrade Hibernate, I find myself spending hours researching conflicting jars for <code>MethodNotFoundException</code> or <code>ClassNotFoundException</code>'s. There must be a simpler way?</p> <p>I thought for sure that with the announcement they were merging the modules back to a single core project, that these conflicts would go away?</p> <p><code>&lt;/indulgent_rant&gt;</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload