Wednesday, 16 November 2011

ORA-00001: unique constraint violated

(Pasted here for posterity so probably not an interesting read unless you actually have the same problem and found this while googling) One of my colleagues Leendert Visscher had this weird problem today with a Oracle+JPA+JBOSS getting a
java.sql.BatchUpdateException: ORA-00001: unique constraint violated

Even after making sure all the sequences were fine eg. like checking that quering a nexval and making sure it will not conflict with existing values, the error still persisted :(

The solution was to rebuild the index?!! FTW

We found it after getting the hint while googling a bit.

No comments:

Post a Comment