Exception: caused By:java.lang.NoSuchMethodError:javax.persistence.OneToMany.orphanRemoval () Z

Source: Internet
Author: User

Spring3.0 + Hibernate3.5:
To start the server report:
caused By:java.lang.NoSuchMethodError:javax.persistence.OneToMany.orphanRemoval () Z

Before hibernate3.5, we used hibernate to develop a Java EE project that would typically lead to the following jar packages:
Hibernate Core Pack: Hibernate3.jar
Persistence: Ejb3-persistence.jar
Then Javax.persistence.OneToMany.class is in the Ejb3-persistence.jar.


In hibernate3.5 and beyond, using hibernate to develop a EE project typically leads to several jar packages:
Hibernate Core Pack: Hibernate3.jar
Persistence: Hibernate-jpa-2.0-xxx.jar
Ejb3-persistence.jar all class libraries and other extensions are already included in the Hibernate-jpa-2.0-xxx.jar, although Javax.persistence.OneToMany.class is also in the HIBERNATE-JPA-2.0-XX In the X.jar.
So when we start from the 3.5 to 3.5 above, it is very easy to see which jar packages should be deleted, and two jar packages exist simultaneously, this conflict exception occurs.

Exception: caused By:java.lang.NoSuchMethodError:javax.persistence.OneToMany.orphanRemoval () Z

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.