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 Sun, 08 Mar 2015 17:06:38 GMT

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

Bryan Pendleton commented on DERBY-6773:

On my system, I have been successfully running the DerbyRepro test program
with ONLY trunk\jars\sane\derby.jar in my classpath, so that's what I'd like you to try.

A close reading of your most recent pastebin shows that you're actually getting
a *different* error:

    Caused by: ERROR XCW00: Unsupported upgrade from '10.11' to '10.12 beta'.

This means, I believe, that you ran the repro program once with 


and then later when you tried to run it with 


Derby noticed that you were trying to use a different version of Derby on the
same test database tables, and gave you that message.

Please try running:

    cd c:/p4clients/svnmain/client7/trunk/systest/out142
    rmdir /s /q edb
    rmdir /s /q derbydb

That will remove the old test databases from your 'out142' directory.

Then try re-running the DerbyRepro program, using ONLY 


in your classpath (plus of course you need the directory where the
DerbyRepro test program's .class file is located). So for me, I do:

    cd C:\Users\Bryan\derby\issues\derby6773
    rmdir /s /q edb derbydb
    java -cp .;\users\bryan\derby\trunk\jars\sane\derby.jar DERBY6733Repro

> 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, 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