I recently upgraded the Hibernate version of our project to 4.1.8. Upon doing so, deployment of the built ear-file failed, due to it not find the method "orphanRemoval" in the class OneToMany. After a bit of research I found that this method is new in JPA 2.0, and I landed on the conclusion that I might as well upgrade to JPA 2.0 as well. But that was not so easy. After making sure that all JPA 1 dependencies were removed, I still got the error.
After some more digging I found that the OneToMany class being used is the one residing in hibernate-jpa-2.0-api-1.0.1.Final.jar, a transitive dependency from hibernate-entitymanager 4.1.8. But this class does not contain the method orphanRemoval! I find it very strange that something marked as being jpa 2.0 is lacking one of the methods of the api specification, and even stranger that upgrading hibernate would result in it calling non-existing methods in dependencies that it itself provides.
Is this some kind of error, or am I just doing it wrong?
|