It's a little bit strange cause I've at the moment this problem only launching test in eclipse, while it works properly at runtime when deployed on an jee application server
these my gradle dependencies implementation 'org.apache.cxf:cxf-rt-frontend-jaxws:3.3.2' implementation 'org.apache.cxf:cxf-rt-transports-http:3.3.2' implementation 'org.apache.cxf:cxf-rt-ws-security:3.3.2' implementation 'org.apache.cxf:cxf-rt-rs-client:3.3.2' implementation 'org.apache.cxf:cxf-rt-features-logging:3.3.2' thanks in advance luke Il giorno ven 6 mar 2020 alle ore 11:03 Colm O hEigeartaigh < [email protected]> ha scritto: > Looks like an incompatible Woodstox version is on the classpath. What > version are you using? > > Colm. > > On Fri, Mar 6, 2020 at 8:28 AM luke <[email protected]> wrote: > > > Hi > > > > I've an NoSuchMethodError invoking cxf api from a Junit test in eclipse. > > > > I'm using cxf 3.3.2 > > > > This my stack trace: > > > > java.lang.NoSuchMethodError: > > > > > org.codehaus.stax2.ri.EmptyIterator.getInstance()Lorg/codehaus/stax2/ri/EmptyIterator; > > > > at > > com.ctc.wstx.sw.OutputElementBase.getPrefixes(OutputElementBase.java:358) > > at > org.apache.cxf.staxutils.StaxUtils.writeStartElement(StaxUtils.java:805) > > at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:752) > > at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:716) > > at > > > > > org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:214) > > at > > > > > org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:174) > > at > > > > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) > > at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) > > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) > > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) > > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) > > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) > > at > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) > > at com.sun.proxy.$Proxy70.getCardList(Unknown Source) > > ..... > > at > > > > > org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686) > > at > > > > > org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) > > at > > > > > org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) > > at > > > > > org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) > > at > > > > > org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126) > > at > > > > > org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:68) > > at > > > > > org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) > > at > > > > > org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) > > at > > > > > org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) > > at > > > > > org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) > > at > > > > > org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) > > at > > > > > org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) > > at > > > > > org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) > > at > > > > > org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) > > at > > > > > org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$8(ClassBasedTestDescriptor.java:375) > > at > > > > > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > > at > > > > > org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:373) > > at > > > > > org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:193) > > at > > > > > org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:132) > > at > > > > > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) > > at > > org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) > > at > > > > > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) > > at java.util.ArrayList.forEach(ArrayList.java:1249) > > at > > > > > org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) > > at > > > > > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) > > at > > org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) > > at > > > > > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) > > at > > > > > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) > > at > > > > > org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) > > at > > > > > org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) > > at > > > > > org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) > > at > > > > > org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248) > > at > > > > > org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211) > > at > > > > > org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226) > > at > > > > > org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199) > > at > > > > > org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132) > > at > > > > > org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:86) > > at > > > > > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > > at > > > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538) > > at > > > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760) > > at > > > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460) > > at > > > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206) > > > > > > thanks in advance > > luca > > >
