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