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 AB39F183F3 for ; Mon, 10 Aug 2015 11:19:43 +0000 (UTC) Received: (qmail 9631 invoked by uid 500); 10 Aug 2015 11:19:43 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 9584 invoked by uid 500); 10 Aug 2015 11:19:43 -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 9566 invoked by uid 99); 10 Aug 2015 11:19:42 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Aug 2015 11:19:42 +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 7870DDBE45 for ; Mon, 10 Aug 2015 11:19:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.899 X-Spam-Level: ** X-Spam-Status: No, score=2.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id F_JH1o9FWNc2 for ; Mon, 10 Aug 2015 11:19:32 +0000 (UTC) Received: from mail-yk0-f176.google.com (mail-yk0-f176.google.com [209.85.160.176]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id DAFD8261CD for ; Mon, 10 Aug 2015 11:19:31 +0000 (UTC) Received: by ykeo23 with SMTP id o23so136006265yke.3 for ; Mon, 10 Aug 2015 04:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=1++HnyJ85xjp0En/XTTMwu55LChAo5VvzyeAbtBEiYk=; b=SgvN8/gwqvukalaOXrG5CBWUomY1yyOCXNNLZza0IIgvvUxdLaKQWjv6iWobXs+3PQ 0Z7TnM4mNEYurbgn+iiQIzjcbMVU1ym/ZAAH1RqY/VrP52LypWO4ZAlIp6Du4vS94Oez SAsdnH95MbtgDcMw2oGqcLTY4b5ocS7W8oHpsutweHLkcQtJu82mTymANFaSb2nySkjN 8QHy+GQOaMdM576K9UTdqgSHVTVhSP9wFuUDMnnV+RiO2Tv/wnKF0VYgA4yE3iQ7z6EP +LKageAhq5xmqpf5TGofYwoYV1X70yrATU+0Abba8HapG7sGywyAAatT0V0j3c1y3kYi HDfw== MIME-Version: 1.0 X-Received: by 10.170.158.87 with SMTP id z84mr20288606ykc.30.1439205571155; Mon, 10 Aug 2015 04:19:31 -0700 (PDT) Received: by 10.37.83.136 with HTTP; Mon, 10 Aug 2015 04:19:31 -0700 (PDT) Date: Mon, 10 Aug 2015 13:19:31 +0200 Message-ID: Subject: Logging Error in Message or Exchange in DB (Not getting the exception in Processor) From: Felix Thomas To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a1139d202d3e101051cf3288c --001a1139d202d3e101051cf3288c Content-Type: text/plain; charset=UTF-8 Hello, I tried the Below error Handling using DeadLetterChannel , but currently I am not getting the exception or error in my processor . I want to log in DB the message along with the reason it failed , for example JDBC exception, Null pointer exception , data Validation exception in some method etc. In the Error Processor is called proper on Exception, But I dont get an Exception from exchange object nor Fault from the message object. i tried the below flags too. exchange.isFailed() and message.isFault() but returned false. While in the Logs I can see the exception printed 2015-08-10 12:19:19,218 [read #8 - Split] DEBUG DeadLetterChannel - Failed delivery for (MessageId: ID-DEACR002901-62175-1439201946611-0-1 on ExchangeId: ID-DEACR002901-62175-1439201946611-0-10). On delivery attempt: 0 caught: java.lang.NullPointerException Failed delivery for (MessageId: ID-DEACR002901-62175-1439201946611-0-1 on ExchangeId: ID-DEACR002901-62175-1439201946611-0-14). On delivery attempt: 1 caught: java.lang.NullPointerException How do I get the Origin of the exception in my errorprocessor. regards, Felix T --001a1139d202d3e101051cf3288c--