camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-7867) NullPointerException when using CXF endpoint to enrich
Date Thu, 09 Oct 2014 02:28:34 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-7867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jiang resolved CAMEL-7867.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.15.0
                   2.14.1
                   2.13.3
                   2.12.5

> NullPointerException when using CXF endpoint to enrich
> ------------------------------------------------------
>
>                 Key: CAMEL-7867
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7867
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.13.2
>         Environment: Maven project on RHEL
>            Reporter: David Hudlow
>            Assignee: Willem Jiang
>             Fix For: 2.12.5, 2.13.3, 2.14.1, 2.15.0
>
>
> When using Spring application context file to enrich a CXF message with another CXF endpoint,
I get a NullPointerException whenever a message comes in. If I route with a <to> instead
of <enrich>, it works fine.
>     <cxf:cxfEndpoint id="producerEndpoint"
>                      address="/Request/"
>                      serviceClass="com.service.ClassName"
>                      wsdlURL="/Service.wsdl" >
>     </cxf:cxfEndpoint>
>     <cxf:cxfEndpoint id="enrichEndpoint"
>                      address="http://localhost:8082/Request/"
>                      serviceClass="com.service.ClassName"
>                      wsdlURL="/Service.wsdl">
>     </cxf:cxfEndpoint>
> ...
>     <camelContext xmlns="http://camel.apache.org/schema/spring">
>         <route>
>             <from ref="producerEndpoint" />
>             <enrich ref="enrichEndpoint" />
>             <to ref="finalEndpoint" />
>         </route>
>     </camelContext>
> Stacktrace
> ---------------------------------------------------------------------------------------------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.camel.component.cxf.CxfProducer.prepareRequest(CxfProducer.java:190)
> 	at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:107)
> 	at org.apache.camel.processor.Enricher.process(Enricher.java:114)
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
> 	at org.apache.camel.component.cxf.CxfConsumer$1.syncInvoke(CxfConsumer.java:136)
> 	at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:77)
> 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)
> 	at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
> 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
> 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> 	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:243)
> 	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)
> 	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1568)
> 	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:164)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1539)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> 	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
> 	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:459)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)
> 	at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:594)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:525)
> 	at java.lang.Thread.run(Thread.java:745)
> [              qtp1470360717-16] PhaseInterceptorChain          WARN  Application {http://gl.services.csw}CswPortService#{http://gl.services.csw}getRecords
has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: NullPointerException
> 	at org.apache.camel.component.cxf.CxfConsumer$1.checkFailure(CxfConsumer.java:230)
> 	at org.apache.camel.component.cxf.CxfConsumer$1.setResponseBack(CxfConsumer.java:208)
> 	at org.apache.camel.component.cxf.CxfConsumer$1.syncInvoke(CxfConsumer.java:142)
> 	at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:77)
> 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)
> 	at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
> 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
> 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> 	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:243)
> 	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)
> 	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1568)
> 	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:164)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1539)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> 	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
> 	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:459)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)
> 	at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:594)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:525)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
> 	at org.apache.camel.component.cxf.CxfProducer.prepareRequest(CxfProducer.java:190)
> 	at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:107)
> 	at org.apache.camel.processor.Enricher.process(Enricher.java:114)
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
> 	at org.apache.camel.component.cxf.CxfConsumer$1.syncInvoke(CxfConsumer.java:136)
> 	... 41 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message