1 Reply Latest reply on Sep 24, 2010 5:42 AM by Willem Jiang

    Got NoSuchMethodError when invoking CXF JaxWsDynamicClient in FUSE 4.2

    Tao Xiao Newbie

      Hi,

       

      I am getting a NoSuchMethodError when calling CXF JaxWsDynamicClient deployed in FUSE 4.2.

       

      The application is deployed as JBI service assembly. It works when running standalone.

       

      Here is the code snippet,

       

       

      public String2StringMap provision(ProvisionReqVO provisionReqVO) throws Exception

          {

              JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();

              Client client = factory.createClient(getClass().getClassLoader().getResource("a-wsdl-.xml")

                      .toExternalForm(), PROVISION_MANAGEMENT_WSDL_SERVICE_NAME);

               

              // client.

              ClientImpl clientImpl = (ClientImpl) client;

      }

       

       

      Here is the exception

       

       

      Caused by: java.lang.NoSuchMethodError: org.apache.cxf.staxutils.StaxUtils.read(Ljava/io/InputStream;)Lorg/w3c/dom/Document;

           at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.addSchemas(DynamicClientFactory.java:430)

           at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:271)

           at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:198)

           at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:191)

           at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:184)

           at au.com.melbourneit.internal.ws.service.ProvisionManagementWebServices.provision(ProvisionManagementWebServices.java:73)

           at au.com.melbourneit.internal.ws.client.ProvisionManagementWebservicesClient.invokeProvisionManagementWebservices(ProvisionManagementWebservicesClient.java:17)

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

           at java.lang.reflect.Method.invoke(Method.java:592)

           at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:214)

           at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:133)

           at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:137)

           at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95)

           at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:65)

           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)

           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)

           at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)

           at org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)

           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

           at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)

           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)

           ... 17 more

       

       

       

       

       

      I double checked my dependencies of the project, StaxUtils which is included in the project lib does have the method but the other StaxUtils in the cxf bundle shipped with the fuse kit does not have the method. So it seems that the project doesn't load the StaxUtils correctly.

       

       

      Thanks