Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 7149 invoked from network); 12 Jan 2008 07:24:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2008 07:24:08 -0000 Received: (qmail 7195 invoked by uid 500); 12 Jan 2008 07:23:58 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 7174 invoked by uid 500); 12 Jan 2008 07:23:58 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 7165 invoked by uid 99); 12 Jan 2008 07:23:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2008 23:23:58 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Jan 2008 07:23:53 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3CC3B71423E for ; Fri, 11 Jan 2008 23:23:45 -0800 (PST) Message-ID: <12860803.1200122625243.JavaMail.jira@brutus> Date: Fri, 11 Jan 2008 23:23:45 -0800 (PST) From: "Willem Jiang (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Work started: (CAMEL-286) NullPointerException in CXF routes when there is an endpoint between router and service CXF endpoints In-Reply-To: <16119315.1200071385014.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on CAMEL-286 started by Willem Jiang. > 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.3.0 > Environment: SO: Windows XP Professional 32bit > JDK 1.5.0_11-b03 > Reporter: Wilson Freitas > Assignee: Willem Jiang > > 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.