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

Bryan Pendleton commented on DERBY-6773:
----------------------------------------

One way to look at this is that we'd like to be able to modify 
DERBY6773Repro.java so
that the last few lines read:

                } catch 
(org.apache.derby.jdbc.DerbySQLIntegrityConstraintViolationException e ) {
                        System.out.println( " Constraint " + 
e.getConstraintName() + 
                                                       " violated on table " + 
e.getTableName() );
                } catch (Throwable t) {
                        t.printStackTrace();
                }

I'm not sure about the build error that you received. Can you run 'svn diff > 
d6773.diff'
and attach your current working patch to this issue so that we can try building
with it and see if we get the same build error?


> 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: DERBY6733Repro.java
>
>
> 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)

Reply via email to