Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 21758 invoked from network); 17 Feb 2006 23:38:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Feb 2006 23:38:19 -0000 Received: (qmail 9247 invoked by uid 500); 17 Feb 2006 23:38:14 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 9035 invoked by uid 500); 17 Feb 2006 23:38:13 -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: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 8960 invoked by uid 99); 17 Feb 2006 23:38:13 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2006 15:38:11 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 3B8B2126 for ; Sat, 18 Feb 2006 00:37:50 +0100 (CET) Message-ID: <182421504.1140219470237.JavaMail.jira@ajax.apache.org> Date: Sat, 18 Feb 2006 00:37:50 +0100 (CET) From: "David Van Couvering (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-922) getSQLException() method in client.am.SqlException does not correctly chain exceptions In-Reply-To: <986989694.1138998844416.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-922?page=all ] David Van Couvering closed DERBY-922: ------------------------------------- > getSQLException() method in client.am.SqlException does not correctly chain exceptions > -------------------------------------------------------------------------------------- > > Key: DERBY-922 > URL: http://issues.apache.org/jira/browse/DERBY-922 > Project: Derby > Type: Bug > Reporter: David Van Couvering > Assignee: David Van Couvering > > This was detected by Knut Anders. From his email: > I think > > if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14 ) > { > sqle.initCause(getCause()); > } > > should have been > > if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14 ) > { > sqle.initCause(this); > } > > It is the SqlException that is the cause of the SQLException. The > cause of an SqlException is often null, and if we pass the null value > to SQLException.initCause(), we lose all of the driver internal stack > trace, and it makes debugging very difficult. All we get in the stack > trace is SqlException.getSQLException(), the top-level JDBC method and > the application stack. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira