Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 使用CXF和Apache Camel迁移到Spring boot 2时出现问题_Spring Boot_Apache Camel_Cxf - Fatal编程技术网

Spring boot 使用CXF和Apache Camel迁移到Spring boot 2时出现问题

Spring boot 使用CXF和Apache Camel迁移到Spring boot 2时出现问题,spring-boot,apache-camel,cxf,Spring Boot,Apache Camel,Cxf,在我的项目中,我们使用的是SpringBoot1.5.7、ApacheCamel 2.19.3和ApacheCxf3.2.1,SOAP服务没有问题。但是当使用ApacheCamel 2.24.1和ApacheCxf3.3.2迁移到SpringBoot2.1.3时,SOAP服务已经停止工作 我希望在调用SOAP服务时,答案是正确的,就像迁移之前一样。然而,我现在遇到的错误如下 [ main] SpringCamelContext

在我的项目中,我们使用的是SpringBoot1.5.7、ApacheCamel 2.19.3和ApacheCxf3.2.1,SOAP服务没有问题。但是当使用ApacheCamel 2.24.1和ApacheCxf3.3.2迁移到SpringBoot2.1.3时,SOAP服务已经停止工作

我希望在调用SOAP服务时,答案是正确的,就像迁移之前一样。然而,我现在遇到的错误如下

[                          main] SpringCamelContext             INFO  Total 23 routes, of which 23 are started
[                          main] SpringCamelContext             INFO  Apache Camel 2.24.1 (CamelContext: mainContextCamel) started in 6.011 seconds
[                          main] InitApplication                INFO  Started InitApplication in 17.779 seconds (JVM running for 30.23)
[               qtp83182348-187] input                          INFO  Exchange[ExchangePattern: InOut, BodyType: null, Body: [Body is null]]
[               qtp83182348-182] PhaseInterceptorChain          WARN  Interceptor for {http://adaptation.ws.iacm.indra.com}adaptationService#{http://adaptation.ws.iacm.indra.com}getDefaultStep has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: null
    at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:107) ~[cxf-rt-frontend-jaxws-3.2.7.jar:3.2.7]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [cxf-core-3.3.2.jar:3.3.2]
    at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) [cxf-core-3.3.2.jar:3.3.2]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [cxf-core-3.3.2.jar:3.3.2]
    at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:278) [cxf-core-3.3.2.jar:3.3.2]
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78) [cxf-core-3.3.2.jar:3.3.2]
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) [cxf-rt-transports-http-3.3.2.jar:3.3.2]
    at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247) [cxf-rt-transports-http-jetty-3.3.2.jar:3.3.2]
    at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79) [cxf-rt-transports-http-jetty-3.3.2.jar:3.3.2]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:205) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:194) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.Server.handleAsync(Server.java:547) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:388) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:305) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.lang.NullPointerException
    at com.indra.iacm.adm.adp.jaxws_asm.GetDefaultStepResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source) ~[?:?]
    at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:91) ~[cxf-rt-frontend-jaxws-3.2.7.jar:3.2.7]
    ... 22 more

这个空指针错误似乎来自cxf服务的服务器端,因此您应该查看服务的后端。

尝试查看您自己的源代码,在
m.indra.iacm.adm.adp.jaxws_asm.GetDefaultStepResponse\u WrapperTypeHelper1.createWrapperObject中获取NPE的位置,例如,通过调试或添加日志输出etcAt,我所做的许多测试中的时间就是调试代码。我发现obs是空的。Object o2=helper.createWrapperObject(objs);我看到了一个重要的区别。在从版本迁移之前,当我进行SOAP调用时,我首先通过我的服务,然后通过WrapperClassOutiterCeptor拦截器。然而,在迁移SOAP调用之后,它从未到达我的服务。拦截器给了我NPE,因为服务的响应是空的。问题是这个拦截器在调用我的服务之前跳转了。这在迁移之前是没有发生过的。