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 50DFC18AFA for ; Wed, 23 Mar 2016 13:17:58 +0000 (UTC) Received: (qmail 72775 invoked by uid 500); 23 Mar 2016 13:17:57 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 72721 invoked by uid 500); 23 Mar 2016 13:17:57 -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 Received: (qmail 72709 invoked by uid 99); 23 Mar 2016 13:17:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2016 13:17:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D5F93C2802 for ; Wed, 23 Mar 2016 13:17:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.593 X-Spam-Level: X-Spam-Status: No, score=0.593 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pronoia-solutions-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ov7eW9EY1lS0 for ; Wed, 23 Mar 2016 13:17:55 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E77125F247 for ; Wed, 23 Mar 2016 13:17:54 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id kf9so5835361obc.1 for ; Wed, 23 Mar 2016 06:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pronoia-solutions-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=s2WyenysmMA50q2rxK1+LyL+ZNGzUkP5mcMkB4Eb0kk=; b=QCknyBaO157Kztdl9o502wMBIm2gQf1+5spadfkMwHC8Wul7WinTIQmallCuYQcdrh ysJhfUV74DdbznFtvEpjujCtYjmCClh5rhQQ+q1voNU6yoxwYPB6BT66x6KlaQaOUmGj nsaegwXTR5FyQ6/YB0nqG9VzY/4pFQxOgGi0hKwsLcdRaC5GoemE2e//vAr5RiXl00BJ BGbS4YLWtEVyYlWe2OjxtoXyUVVUJ/lIKPXRJgLhaaW3qYl5SRpP9uEOgBDizqo6ot7I kA8QqJBsiXZ4wb8ku8QjsYnE+9/JBecfNCC4yZYDZ5GjdTke335S6doZ04ODU8uOME7P cLng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=s2WyenysmMA50q2rxK1+LyL+ZNGzUkP5mcMkB4Eb0kk=; b=IbrTQ1XhDgaP2blrGMKa8icrUO5hKYFcxsv37Lh1rxzYRe5OlBLyWfjcXF346kGXpP Xe0SSdHp2hBn+baBJzxh7WnMPx1s1JgaqNJhDCS2GsSM3gTGwkVK9RQhXxlj1XP6oY4O oUW1FEBWpvykkDxBwCpitToVbzFrC2eYmJTau26VpqgudyHJQ2SHlcLd8n7XhTQsaaUT 44IEgdop+pFSNBDwY2ONTWhcP4tA6zBSChmYRap6xc4aYMB27mBDNWIPxnGQC/5ndPAW WwGCdQqRvg/hBKKqwJqEGq7+7asNxHE41cHSJd4iWZG5FyoMRcv27mwhJ1w20cs5MgI+ vHaA== X-Gm-Message-State: AD7BkJI7tLGOij47p669NpawAZ21WObZJiEx2jvPVzudJnM4iY48Cjo4BG8SMbkxsrYXGg== X-Received: by 10.50.160.11 with SMTP id xg11mr3473374igb.28.1458739053708; Wed, 23 Mar 2016 06:17:33 -0700 (PDT) Received: from macpro.pronoia.local (c-24-10-239-245.hsd1.ut.comcast.net. [24.10.239.245]) by smtp.gmail.com with ESMTPSA id j7sm9346633ige.5.2016.03.23.06.17.33 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Mar 2016 06:17:33 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: onException not working From: Quinn Stevenson In-Reply-To: <1458722726925-5779542.post@n5.nabble.com> Date: Wed, 23 Mar 2016 07:17:28 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <6F74FB3F-EB29-47FA-B0E0-9DBEE9D0E6DC@pronoia-solutions.com> References: <1458722726925-5779542.post@n5.nabble.com> To: users@camel.apache.org X-Mailer: Apple Mail (2.3112) I don=E2=80=99t think you can handle route creation exceptions in the = route builder - Camel is still constructing the route, so the route = builder really can=E2=80=99t handle that type of exception. Have you tried your route when you get an exception while processing an = exchange? It looks like it would work for that. > On Mar 23, 2016, at 2:45 AM, mayur_bm wrote: >=20 > Hi, >=20 > i have onException configured for my camel context, which has couple = of > routes. i have configured onException as below: >=20 > > java.lang.Exception >=20 >=20 > > true > > > ${exception.stacktrace} > >=20 > > >=20 >=20 >=20 > here since my component uses different logging framework, so i just = want > Camel runtime to call my custom method upon any kind of exception = while > initalizing routes or during Route Processing. upon calling i log = messages > using my custom logging framework.=20 >=20 > this is not working!!! >=20 > i just introduced one random exception by removing one custom camel > component in route, same came runtime throws=20 >=20 > org.apache.camel.RuntimeCamelException: > org.apache.camel.FailedToCreateRouteException: Failed to create route = sgDF13 >=20 > but my custom bean method never get called!!, i implemented my bean as > follows: >=20 >=20 > import java.util.Map; >=20 > import org.apache.camel.Body; > import org.apache.camel.Headers; > import org.apache.camel.OutHeaders; >=20 >=20 > public class FrameWorkLogger { >=20 > public Object log(@Headers Map in, @Body String payload, = @OutHeaders > Map out) { >=20 > System.out.println("Calling FrameworkLogging"); > Logging.log(this.getClass(), LogLevel.ERROR, "Calling = FrameworkLogging"); > Logging.log(this.getClass(), LogLevel.ERROR, = "Exception:-" + payload); > return "Error"; > } >=20 > } >=20 > How do i fix this issue?, please help... >=20 > Regards, > mayur=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > -- > View this message in context: = http://camel.465427.n5.nabble.com/onException-not-working-tp5779542.html > Sent from the Camel - Users mailing list archive at Nabble.com.