"JdbcBatchUpdateException: Unique index or primary key violation" when submitting commands to the sandbox?

Hi all,

Using DAML 1.11.1 sandbox, I’m trying to test out creating many contracts at the same time (the system being initialised with data) and I’m running in to an SQL exception I’d appreciate a bit more information on:

org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "PUBLIC.INDEX_5 ON PUBLIC.PARTICIPANT_CONTRACTS(CREATE_KEY_HASH) VALUES 9044"; SQL statement:
merge into participant_contracts using dual
 on contract_id = ? when not matched then
 insert (contract_id, template_id, create_argument, create_argument_compression, create_ledger_effective_time, create_key_hash, create_stakeholders)
 values (?, ?, ?, ?, ?, ?, ?) 

And since I am submitting the commands with submitAndWaitForTransaction it seems to make my app hang.

Any information would be greatly appreciated, thanks!

Hi @lashenhurst, I believe this is the same issue as Exception in Sandbox and looping continuously - #2 by cocreature so try to upgrade to 1.11.2 or even better something newer than 1.13.0.