Note that there are some explanatory texts on larger screens.

plurals
  1. POWeblogic11g - java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()z
    primarykey
    data
    text
    <p>I know this question has been asked quite a few times over here, but none of the solutions seemed to worked for me. Pardon me for asking this one again as I am new to both maven and hibernate.</p> <p>hibernate dependency in pom.xml</p> <pre><code>&lt;hibernate.version&gt;4.2.0.Final&lt;/hibernate.version&gt; &lt;dependency&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt; &lt;version&gt;${hibernate.version}&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt; &lt;version&gt;${hibernate.version}&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p>This gives me following jars:</p> <pre><code>hibernate-entitymanager-4.2.0.Final hibernate-core-4.2.0.Final hibernate-validator-4.2.0.Final hibernate-jpa-2.0-api-1.0.1.Final </code></pre> <p>I also have:</p> <pre><code>hibernate-commons-annotations-4.0.1.Final </code></pre> <p>But I am not sure how I got it.</p> <p>I am using the one-to-one relationship for a Category - Product relationship.</p> <pre><code>@Entity @Table(name="Products") public class Product { @Id @Column(name="id") @GeneratedValue int productId; @NotEmpty @Length(max=50) @Column(name="name") String name; @Column(name="category_id") int categoryId; @OneToOne @ForeignKey(name="categoryId") private Category category; // getters and setters } </code></pre> <p>Edit:</p> <p>Since it is clear that Weblogic 11g jpa jar is taking precedence over the 'hibernate-jpa-2.0-api'. Should I fallback to an older version of hibernate that uses jpa-1.0 or is there a way I can enforce weblogic to use 'hibernate-jpa-2.0-api' instead of its jpa jar?</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