Проблемы при переходе на Spring boot 2 с CXF и Apache Camel - PullRequest
0 голосов
/ 08 июля 2019

В моем проекте мы работали с Spring Boot 1.5.7, Apache Camel 2.19.3 и Apache CXF 3.2.1, и у нас не было проблем со службами SOAP. Но при переходе на Spring Boot 2.1.3 с Apache Camel 2.24.1 и Apache CXF 3.3.2 службы 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 Ответ

1 голос
/ 09 июля 2019

Кажется, эта ошибка нулевого указателя происходит от вашей серверной части службы cxf, поэтому вы должны посмотреть на обратную сторону службы.

...