I am trying to deploy my application and web service to weblogic using the following versions:
When I call my web service I get the error
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
<faultcode>ns2:Server</faultcode>
<faultstring>javax/persistence/OneToMany.orphanRemoval()Z</faultstring>
<detail>
<ns2:exception class="java.lang.NoSuchMethodError" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false" xmlns:ns2="http://jax-ws.dev.java.net/">
<message>javax/persistence/OneToMany.orphanRemoval()Z</message>
<ns2:stackTrace>
<ns2:frame class="org.hibernate.cfg.AnnotationBinder" file="AnnotationBinder.java" line="1868" method="processElementAnnotations"/>
<ns2:frame class="org.hibernate.cfg.AnnotationBinder" file="AnnotationBinder.java" line="768" method="processIdPropertiesIfNotAlready"/>
...
I have checked and there is no other persistence api jars included.
My external jar list is:
I have checked these and the Hibernate JPA is the only one with the OneToMany class. I know the problem is a conflict between JPA 1.0 and JPA 2.0 so I just want to know if there is a way around the conflict.
Thanks
Do you have to use Hibernate JPA API 2.0?
As mentioned in WebLogic doc, WebLogic 10.3.5 seems to roughly support for only one JPA 2.0 provider, which is called TopLink.
Maybe you could just remove the hibernate-jpa-2.0-api-1.0.1.Final.jar
from your classpath and try use TopLink as described in the above mentioned WebLogic documentation.
I'll just give a little note given the docs: by default WebLogic 10.3.5 uses JPA 1.0 in order to maintain Java EE 5 compatibility. Since JPA 2.0 is part of Java EE 6, you have to explicitly enable it.