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

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

Hi Abhinav,

I think this is very good progress. Here's what I did with the code you 
attached:
I put the DerbySQLIntegrityConstraintViolationException.java into the same
directory as SQLExceptionFactory, rather than into the 'jdbc4 stubs' directory.

After I did that, I get much farther: my code compiles, but I get an error 
building the
derby.jar, in the 'jardriftcheck' target:

jardriftcheck:
     [java] ERROR: class org.apache.derby.impl.jdbc.DerbySQLIntegrityConstraintV
iolationException.class in
     [java]        derby.jar was not previously there.
     [java]
     [java] Exception in thread "main" java.lang.Exception:
     [java] jar drift check failed; see DERBY-6471 for info.
     [java] See error in build output or call ant jardriftcheck.
     [java] If the new class is expected run ant refreshjardriftcheck.
     [java] NB: Run the refresh for both sane and insane builds.
     [java]     Use the highest supported JVM (currently Java 8)
     [java]      to ensure all classes are built.
     [java]
     [java]     at 
org.apache.derbyBuild.JarDriftTest.main(JarDriftTest.java:103)

I will have to investigate that message, as it is new to me.

In the meantime, I am attaching my 'svn diff'


> 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, 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
(v6.3.4#6332)

Reply via email to