vendredi 29 mai 2015

Soap11Factory NoClassDefFoundError occurs when using weblogic-application.xml

I am using an EAR to deploy in Weblogic 12c which contains a war used for SOAP calls. I have added a weblogic-application.xml which contains the following settings

 <?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://ift.tt/1MZYFRt" xmlns:xsi="http://ift.tt/ra1lAU" xsi:schemaLocation="http://ift.tt/nSRXKP http://ift.tt/1xdJq1T http://ift.tt/1MZYFRt http://ift.tt/1MZYLs4">
<wls:prefer-application-packages>
        <wls:package-name>org.slf4j.*</wls:package-name>
</wls:prefer-application-packages>

(Note : This change is done so that I get to use the slf4j jar that i have imported in maven instead of the slf4j jar packaged with weblogic 12c. This is a common issue)

Now on making Soap Calls to my server, I get the following Error in my Logs

java.lang.NoClassDefFoundError: org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory
at org.apache.axis2.saaj.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:108)
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:175)
at org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:78)
at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.getOpQName(SOAPHandlerInterceptor.java:322)
at org.apache.cxf.jaxws.handler.AbstractJAXWSHandlerInterceptor.setupBindingOperationInfo(AbstractJAXWSHandlerInterceptor.java:111)
Truncated. see log file for complete stacktrace

Normally I'd add the jar as a maven dependency in these situations , but the above issue occurs only when i add the weblogic-application.xml in my EAR. It works fine when i redeploy the ear without the weblogic xml file.

Any idea why this Error is connected with the weblogic-application.xml file?

Aucun commentaire:

Enregistrer un commentaire