Webservice created from Spring throws LinkageError in runtime due to "loader constraint violation" (Doc ID 1316723.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle WebLogic Server - Version 10.3.4 and later
Information in this document applies to any platform.
***Checked for relevance on 04-June-2014***

Symptoms

Webservice (.WAR) is created using Spring framework, and is deployed to WebLogic 10.3.4 (WLS) successfully.

When invoking the webservice from test client, the following error is logged to WLS server log -

Root cause of ServletException.
java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.xml.soap.SOAPElement.getElementQName()Ljavax/xml/namespace/QName;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/springframework/ws/soap/saaj/Saaj13Implementation, and the class loader (instance of <bootloader>) for resolved class, javax/xml/soap/SOAPElement, have different Class objects for the type javax/xml/namespace/QName used in the signature
at org.springframework.ws.soap.saaj.Saaj13Implementation.getName(Saaj13Implementation.java:68)
at org.springframework.ws.soap.saaj.SaajSoapEnvelope.getBody(SaajSoapEnvelope.java:53)
at org.springframework.ws.soap.AbstractSoapMessage.getSoapBody(AbstractSoapMessage.java:36)
at org.springframework.ws.soap.AbstractSoapMessage.getPayloadSource(AbstractSoapMessage.java:46)
at org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping.getLookupKeyForMessage(PayloadRootAnnotationMethodEndpointMapping.java:58)
Truncated. see log file for complete stacktrace

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms