db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6773) Derby throws plain SQLIntegrityConstraintViolationException
Date Sat, 14 Mar 2015 00:36:39 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14361403#comment-14361403

Bryan Pendleton commented on DERBY-6773:

Hi Abhinav,

Regarding the "unsupported upgrade" error, it is because you have to do:

     cd c:\dellater
     rmdir /s /q derbydb

This database gets created by line 28 of the repro program, which reads:

   		Connection conn = DriverManager.getConnection("jdbc:derby:c:/dellater/derbydb;create=true",
"sa", "sa");    	

Regarding your observation about "severity" and "ferry", you are absolutely
correct; this is a difference between the way the SQLExceptionFactory works
in the engine, and the way it works in the client.

We will have to study this, to understand it better.

Perhaps, reviewing the SVN history of the two SQLExceptionFactory.java
classes will give some clues.

I will try to study this issue. And, if you can study it too, and let us know what
you observe, that would be great too!

> 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:
>         Environment: Windows 7 x86_64, Java
>            Reporter: Jochen Wiedmann
>            Assignee: Abhinav Gupta
>            Priority: Minor
>         Attachments: DERBY6733Repro.java, SamePackage.diff, SharedException.diff, ant
-verbose build all.txt
> 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

View raw message