使用CXF和Apache Camel迁移到Spring Boot 2的问题

时间:2019-07-08 06:39:19

标签: spring-boot apache-camel cxf

在我的项目中,我们正在使用Spring Boot 1.5.7,Apache Camel 2.19.3和Apache CXF 3.2.1,并且SOAP服务没有问题。但是,当使用Apache Camel 2.24.1和Apache CXF 3.3.2迁移到Spring Boot 2.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

1 个答案:

答案 0 :(得分:1)

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