Note that there are some explanatory texts on larger screens.

plurals
  1. POCould not initialize class org.apache.cxf.staxutils.StaxUtils
    text
    copied!<p>I'm developing an application using Spring/Maven and I'm experiencing a problem with a dependency. Everything was working but when I added a dependency to Spring-WS, my tests stopped working.</p> <p>Here is the stacktrace I have, leading to a <strong>Failed to load ApplicationContext</strong></p> <pre><code>Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.staxutils.StaxUtils at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:256) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:203) at org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:98) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:199) at org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:147) at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:98) at javax.xml.ws.Service.&lt;init&gt;(Service.java:77) at com.mycompany.webservice.documentservice.client.DocumentServiceService.&lt;init&gt;(DocumentServiceService.java:61) at com.mycompany.service.implementation.DocumentService.&lt;init&gt;(DocumentService.java:121) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) </code></pre> <p>And here is the new dependencies :</p> <pre><code>&lt;!-- Spring WS --&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt; &lt;artifactId&gt;spring-ws-core&lt;/artifactId&gt; &lt;version&gt;${spring-ws.version}&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt; &lt;artifactId&gt;spring-ws-security&lt;/artifactId&gt; &lt;version&gt;${spring-ws.version}&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p>I think there is a conflict with CXF dependencies but can't find where :</p> <pre><code>&lt;!-- Web Service --&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt; &lt;artifactId&gt;cxf-rt-core&lt;/artifactId&gt; &lt;version&gt;${cxf.version}&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt; &lt;artifactId&gt;cxf-rt-frontend-jaxws&lt;/artifactId&gt; &lt;version&gt;${cxf.version}&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt; &lt;artifactId&gt;cxf-rt-ws-security&lt;/artifactId&gt; &lt;version&gt;${cxf.version}&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p>Here are the conflicts, but when I add an exclusion the problem still occurs <img src="https://i.stack.imgur.com/1WQTq.png" alt="Conflict with wsdl4j"> <img src="https://i.stack.imgur.com/jM7jO.png" alt="Conflict with wss4j"></p> <p>Thanks for the help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload