1 Reply Latest reply on Aug 3, 2017 11:22 AM by Carl Walker

    Failed to Link org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor

    Carl Walker Newbie

      Hi,

       

      I'm trying to get an Apache CXF to work, but am having trouble deploying.  My goal is to use JBossWS as much as possible.   My working @WebService is packaged in a WAR with no /WEB-INF/lib folder.  Although my project name mentions Spring, Spring isn't in my project right now.

       

      However, when I add an Interceptor to the project, I get the following error (abbreviated).

       

      17:12:26,810 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."wildfly11-spring-demo-project-1.0-SNAPSHOT.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."wildfly11-spring-demo-project-1.0-SNAPSHOT.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "wildfly11-spring-demo-project-1.0-SNAPSHOT.war"

      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)

      Caused by: java.lang.NoClassDefFoundError: Failed to link wf11/spring/demo/project/TestInboundInterceptor (Module "deployment.wildfly11-spring-demo-project-1.0-SNAPSHOT.war" from Service Module Loader): org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor

      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

       

      This is my Interceptor code.

       

      public class TestInboundInterceptor extends AbstractSoapInterceptor {

         public TestInboundInterceptor() {super(Phase.PRE_INVOKE);}

         @Override
         public void handleMessage(SoapMessage soapMessage) throws Fault {

        }

      }

       

      I'm referencing it in /WEB-INF/jboss-webservices.xml.

       

      <?xml version="1.1" encoding="UTF-8"?>
      <webservices
         xmlns="http://www.jboss.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         version="1.2"
         xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee">

         <property>

         <name>cxf.interceptors.in</name>

         <value>wf11.spring.demo.project.TestInboundInterceptor</value>

         </property>

      </webservices>

       

      I'm tried a few jboss-deployment-structure.xml files, adding org.apache.cxf with various attributes.  My current deployment file is empty.

       

      As mentioned earlier, if I pull out the Interceptor reference in jboss-webservices.xml, my SOAP-based web service works fine.

       

      Thanks in advance,

      Carl

        • 1. Re: Failed to Link org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor
          Carl Walker Newbie

          The ClassNotFoundException went away after I added the org.apache.cxf.impl module.  The org.apache.cxf module doesn't import the AbstractSoapInterceptor class into the app (just to itself).

           

          Here's my deployment structure.

           

          <?xml version="1.0"?>
          <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">

           

             <deployment>

             <dependencies>

             <module name="org.apache.cxf" />

             <module name="org.apache.cxf.impl" />

             <module name="org.apache.commons.logging" />

             <module name="org.slf4j" />

             </dependencies>

             </deployment>

           

          </jboss-deployment-structure>