> -----Original Message----- > From: Charles Moulliard [mailto:cmoulli...@gmail.com] > Sent: Monday, December 07, 2009 8:05 AM > To: users@openjpa.apache.org > Subject: Violation of unique constraint $$: duplicate value(s) for > column > > Hi, > > I use openjpa version 1.3-snasphot and the following entity class which > is > used in my application generates the following error : > > [deleted] > ERROR : > > Caused by: <openjpa-1.3.0-SNAPSHOT-r422266:881892 nonfatal general > error> > org.apache.openjpa.persistence.PersistenceException: Violation of > unique > constraint $$: duplicate value(s) for column(s) $$: U_CML_NTN_NAME in > statement [INSERT INTO CAMEL_PROCESSDEFINITION (id, name) VALUES (?, > ?)] > {prepstmnt 30276889 INSERT INTO CAMEL_PROCESSDEFINITION (id, name) > VALUES > (?, ?) [params=(long) 7, (String) ]} [code=-104, state=23000]
It sure looks to me like you're trying to insert a row with a NULL "name" value. It doesn't make sense to have a unique constraint on a NULLABLE column.