Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F113184BC for ; Wed, 19 Aug 2015 23:39:49 +0000 (UTC) Received: (qmail 56629 invoked by uid 500); 19 Aug 2015 23:39:46 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 56599 invoked by uid 500); 19 Aug 2015 23:39:46 -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 56585 invoked by uid 99); 19 Aug 2015 23:39:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2015 23:39:46 +0000 Date: Wed, 19 Aug 2015 23:39:46 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6773) Derby throws plain SQLIntegrityConstraintViolationException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14703968#comment-14703968 ] ASF subversion and git services commented on DERBY-6773: -------------------------------------------------------- Commit 1696690 from [~bryanpendleton] in branch 'code/trunk' [ https://svn.apache.org/r1696690 ] DERBY-6773: Derby throws plain SQLIntegrityConstraintViolationException This patch includes contributions from Abhinav Gupta (abhinavgupta2004 at gmail dot com) This patch enables use of the new Derby-specific subclass of SQLIntegrityConstraintViolationException in both the embedded and client-server configurations of the SQLExceptionFactory. In addition, a number of new tests are added to verify that the new exception is thrown and can be caught as we expect, and that the accessor methods on the new exception allow applications to determine which table name and constraint name were responsible for the exception. We still have a couple cleanup tasks before DERBY-6773 is fully complete, but as of this patch the new behavior is in effect. > Derby throws plain SQLIntegrityConstraintViolationException > ----------------------------------------------------------- > > Key: DERBY-6773 > URL: https://issues.apache.org/jira/browse/DERBY-6773 > Project: Derby > Issue Type: Improvement > Components: JDBC > Affects Versions: 10.10.2.0 > Environment: Windows 7 x86_64, Java 1.6.0.45 > Reporter: Jochen Wiedmann > Assignee: Abhinav Gupta > Priority: Minor > Attachments: CallSuper.diff, DERBY6733Repro.java, IntegrityConstraint.diff, SamePackage.diff, SharedException.diff, addToTestSuite.diff, ant -verbose build all.txt, generateOnClientDoesntWork.diff, passesTests.diff, subPart1.diff, subPart2.diff, switchArgs.diff > > > If a unique constraint is violated by an insert statement, then Derby throws an SQLIntegrityConstraintViolationException. The error message contains, in particular, the constraint name and the table name. > To distinguish between cases with various constraints, Derby should instead throw a subclass of SQLIntegrityConstraintViolationException, with methods like getConstraintName(), and getTableName(). > See also https://hibernate.atlassian.net/browse/HHH-9516. -- This message was sent by Atlassian JIRA (v6.3.4#6332)