Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 62896 invoked from network); 10 May 2005 17:38:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 May 2005 17:38:59 -0000 Received: (qmail 92286 invoked by uid 500); 10 May 2005 17:42:24 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 92250 invoked by uid 500); 10 May 2005 17:42:24 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 92226 invoked by uid 99); 10 May 2005 17:42:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from e33.co.us.ibm.com (HELO e33.co.us.ibm.com) (32.97.110.131) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 10 May 2005 10:42:23 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j4AHcmmD066696 for ; Tue, 10 May 2005 13:38:48 -0400 Received: from [127.0.0.1] (IBM-IKEJ04B1IMA.usca.ibm.com [9.72.133.78]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4AHckh4111272 for ; Tue, 10 May 2005 11:38:48 -0600 Message-ID: <4280F1A4.4050503@sbcglobal.net> Date: Tue, 10 May 2005 10:38:44 -0700 From: Mike Matrigali User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: [PATCH] Derby 237 Boot errror stack traces from store must not be lost References: <427F9437.1070801@gmail.com> In-Reply-To: <427F9437.1070801@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I committed this patch with svn 169501. Sunitha Kambhampati wrote: > http://issues.apache.org/jira/browse/DERBY-237?page=all > > This patch fixes derby-237: Boot errors from store must not lose error > messages/stack traces in between. > > Actually nested exceptions from the boot error were not lost but their > stack traces were not being written out into error stream which is why > the entire stack traces of exceptions was not printed out to derby.log > > svn stat > M java\engine\org\apache\derby\impl\store\raw\log\LogToFile.java > > > -- I tested it with a corrupted database (from derby 241) that resulted > in boot error and the stack traces are printed out ok in derby.log. > -- I ran derbyall suite and all tests passed. > > Please review it and if there are no comments, can a committer please > commit it. > Thanks, Sunitha. > > > ------------------------------------------------------------------------ > > Index: java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java > =================================================================== > --- java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java (revision 168348) > +++ java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java (working copy) > @@ -3951,14 +3951,18 @@ > } > } > > + /** > + * print stack trace from the Throwable including > + * its nested exceptions > + * @param t trace starts from this error > + */ > private void printErrorStack(Throwable t) > { > - Monitor.logMessage("-------------------------\n"); > - t.printStackTrace(Monitor.getStream().getPrintWriter()); > - Monitor.logMessage("-------------------------\n"); > ErrorStringBuilder esb = new ErrorStringBuilder(Monitor.getStream().getHeader()); > esb.stackTrace(t); > - } > + Monitor.logMessage(esb.get().toString()); > + esb.reset(); > + } > > > /**