You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2008/01/16 03:30:45 UTC
[jira] Updated: (CAMEL-286) NullPointerException in CXF routes when
there is an endpoint between router and service CXF endpoints
[ https://issues.apache.org/activemq/browse/CAMEL-286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang updated CAMEL-286:
-------------------------------
Affects Version/s: (was: 1.3.0)
1.2.0
Fix Version/s: (was: 1.4.0)
1.3.0
> NullPointerException in CXF routes when there is an endpoint between router and service CXF endpoints
> -----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-286
> URL: https://issues.apache.org/activemq/browse/CAMEL-286
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 1.2.0
> Environment: SO: Windows XP Professional 32bit
> JDK 1.5.0_11-b03
> Reporter: Wilson Freitas
> Assignee: Willem Jiang
> Fix For: 1.3.0
>
>
> When an endpoint is added between a cxf router and a cxf service endpoint the message exchange is interrupted by a NullPointerException.
> Example code:
> -----JAVA-BEGIN----------------------------------------------------------
> //This code works
> from(StringUtils.join(cxfRouterURI)).to(StringUtils.join(cxfServiceURI));
> // This code crashes (same problem with seda and log endpoints)
> String anyEndpoint = "activemq:someQueue";
> -----JAVA-END----------------------------------------------------------
>
> from(StringUtils.join(cxfRouterURI)).to(anyEndpoint).to(StringUtils.join(cxfServiceURI));
> -----EXCEPTION-BEGIN------------------------------------
> 09/01/2008 18:32:40 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault
> at org.apache.camel.component.cxf.interceptors.RawMessageContentRedirectInterceptor.handleMessage(RawMessageContentRedirectInterceptor.java:43)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> at org.apache.camel.component.cxf.invoker.CxfClient.invokeWithMessageStream(CxfClient.java:137)
> at org.apache.camel.component.cxf.invoker.CxfClient.dispatch(CxfClient.java:89)
> at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:202)
> at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:152)
> at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsynProcessorBridge.process(AsyncProcessorTypeConverter.java:44)
> at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:73)
> at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:143)
> at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:87)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
> at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:40)
> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:44)
> at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:68)
> at org.apache.camel.component.cxf.CamelInvoker.invoke(CamelInvoker.java:71)
> at org.apache.camel.component.cxf.interceptors.AbstractInvokerInterceptor.handleMessage(AbstractInvokerInterceptor.java:65)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> at org.apache.camel.component.cxf.CxfMessageObserver.onMessage(CxfMessageObserver.java:83)
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:284)
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:240)
> at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:54)
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> at org.mortbay.jetty.Server.handle(Server.java:313)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:726)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> Caused by: java.lang.NullPointerException
> at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025)
> at org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
> at org.apache.camel.component.cxf.interceptors.RawMessageContentRedirectInterceptor.handleMessage(RawMessageContentRedirectInterceptor.java:39)
> ... 32 more
> -----EXCEPTION-END------------------------------------
> Known workaround:
> Change the code like this:
> -----JAVA-BEGIN----------------------------------------------------------
> String anyEndpoint = "activemq:someQueue";
>
> from(StringUtils.join(cxfRouterURI)).process(new Processor(){
> public void process(Exchange exchange) throws Exception {
> exchange.setOut(exchange.getIn());
> }
> }).to(anyEndpoint).to(StringUtils.join(cxfServiceURI));
> -----JAVA-END----------------------------------------------------------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.