0

While running the DbUunit test cases I am getting following exception:

Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (EMP_SYS.PK_EMP_ID) violated.

After analyzing I understood that DatabaseOperation CLEAN_INSERT will just clean the data from the table but not reset the sequence.

Can anyone help me out to find any way to reset the SEQUENCE value through DB unit?

Thanks in advance...!!

user2319276
  • 47
  • 1
  • 5

1 Answers1

1

In your dataset.xml file you must specify tables in correctly insertion order, this means, the basic tables first and then the related tables. This way DatabaseOperation.CLEAN_INSERT will delete tables in correctly delete order too (related tables first and then basic tables).

Hope this helps.