Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 60914 invoked from network); 3 Sep 2008 15:24:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Sep 2008 15:24:16 -0000 Received: (qmail 77114 invoked by uid 500); 3 Sep 2008 15:24:13 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 77088 invoked by uid 500); 3 Sep 2008 15:24:13 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 77070 invoked by uid 99); 3 Sep 2008 15:24:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 08:24:12 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 15:23:14 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A70EF234C1C6 for ; Wed, 3 Sep 2008 08:23:45 -0700 (PDT) Message-ID: <2114146164.1220455425683.JavaMail.jira@brutus> Date: Wed, 3 Sep 2008 08:23:45 -0700 (PDT) From: "Jukka Zitting (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Resolved: (JCR-1598) Problematic exception handling in Jackrabbit WebApp In-Reply-To: <2049931883.1210683055782.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting resolved JCR-1598. -------------------------------- Resolution: Fixed Fix Version/s: 1.5 Assignee: Jukka Zitting Good point. Added a ServletExceptionWithCause utility class and started using it in revision 691632. Resolving as Fixed. > Problematic exception handling in Jackrabbit WebApp > --------------------------------------------------- > > Key: JCR-1598 > URL: https://issues.apache.org/jira/browse/JCR-1598 > Project: Jackrabbit > Issue Type: Bug > Components: jackrabbit-webapp > Reporter: Thomas Mueller > Assignee: Jukka Zitting > Priority: Minor > Fix For: 1.5 > > > In this project, the cause of the exception is often ignored, and only the message of the cause is used, as in: > } catch (Exception e) { > log.error("Error in configuration: {}", e.toString()); > throw new ServletException("Error in configuration: " + e.toString()); > } > An additional problem is that when using ServletException(String message, Throwable rootCause), the rootCause is not used in printStackTrace(), that means the cause is not logged. See also: http://closingbraces.net/2007/11/27/servletexceptionrootcause/ > It is therefore better to convert > throw new ServletException("Unable to create RMI repository. jcr-rmi.jar might be missing.", e); > to > ServletException s = new ServletException("Unable to create RMI repository. jcr-rmi.jar might be missing."); > s.initCause(e); > throw s; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.