Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D2517FCAA for ; Sat, 27 Apr 2013 05:31:08 +0000 (UTC) Received: (qmail 76889 invoked by uid 500); 27 Apr 2013 05:31:08 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 76840 invoked by uid 500); 27 Apr 2013 05:31:08 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 62968 invoked by uid 99); 26 Apr 2013 22:14:03 -0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Date: Fri, 26 Apr 2013 15:13:16 -0700 (PDT) From: TonyK To: users@camel.apache.org Message-ID: <1367014396754-5731637.post@n5.nabble.com> In-Reply-To: <1366926572322-5731568.post@n5.nabble.com> References: <1366926572322-5731568.post@n5.nabble.com> Subject: Re: Exception in second inOut jms endpoint returns null body to aggregation strategy MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I've trimmed my code to the bear minimum. If I throw the exception in my first call to the child route, then I get the body returned to my aggregation strategy, but when I throw an exception on my second call the body is null when I get to the aggregation strategy. Why would this be? -------------------------------------------------------------------- Main Route -------------------------------------------------------------------- /TXLife/TXLifeRequest *If I throw an exception on the first call to the child route, then my error handler will send me an email with the body of "Test" and when I reach my aggregation strategy the body also says "Test". Which is what I would expect.* Test *If I throw an exception on the second call to the child route, then my error handler will send me an email with the body of "Test2", but when I reach my aggregation strategy the body is null.* Test2 -------------------------------------------------------------------------------------- Child route -------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------ Bean ---------------------------------------------------------------------------------------------- public class ImageServiceCall { public void process(Exchange exchange) throws Exception { if(exchange.getIn().getBody(String.class).equals("Test2")){ throw new IOException(); } } } -- View this message in context: http://camel.465427.n5.nabble.com/Null-Body-tp5731568p5731637.html Sent from the Camel - Users mailing list archive at Nabble.com.