Are you using ibatis dao? It rethrows them as a DaoException which is a RuntimeException, IIRC.
Larry On Wed, Jun 17, 2009 at 10:59 AM, Ivan Bojer<ibo...@gmail.com> wrote: > Hi, > > I have a problem where IBatis never throws any of the constaint > exceptions. My set-up is: > - postgresql 8.3.5 > - postgres JDBC type 3 driver > - ibator for DAO and POJO generation > > I have a simple table which has an unique constraint on the column. e.g. > > CREATE TABLE SCHEMA_CONF.dns_suffix ( > suffix VARCHAR(128) NOT NULL UNIQUE, > ); > > The problem is that I can try to insert 'n' numbers of entries into it > and they will be rejected by database (as expected), but > I never get any SQLExceptions thrown back. Database logs clearly show > that commit was rejected because of UNIQUE constraint > violation. > > What am I missing? Any hints? >