java.lang.RuntimeException: Exception while executing statement : Unique index or primary key violation: "CONSTRAINT_9D9B1_INDEX_F ON PUBLIC.ASSET_META(NAME) VALUES (CAST('SUFFIX' AS VARCHAR_IGNORECASE), 48)"; SQL statement: insert into asset_meta (name, priority, value_type, description, label) values (?,?,?,?,?) [23505-188] errorCode: 23505, sqlState: 23505 insert into asset_meta (name, priority, value_type, description, label) values (?,?,?,?,?) jdbcParams:[SUFFIX,-1,1,SUFFIX,Suffix]


Solutions on the web

Solution icon of github
Exception while executing statement : Unique index or primary key violation: "CONSTRAINT_9D9B1_INDEX_F ON PUBLIC.ASSET_META(NAME) VALUES (CAST('SUFFIX' AS VARCHAR_IGNORECASE), 48)"; SQL statement: insert into asset_meta (name, priority, value_type

Solution icon of github
via GitHub by grahamc
, 8 months ago
Exception while executing statement : Unique index or primary key violation: "CONSTRAINT_9D9B1_INDEX_F ON PUBLIC.ASSET_META(NAME) VALUES (CAST('SUFFIX' AS VARCHAR_IGN Feb 01 17:47:40 nixos dockerd[883]: insert into asset_meta (name, priority

Solution icon of googlegroups
via Google Groups by Alec Wysoker, 4 months ago
Exception while executing statement, errorCode: 42122, sqlState: 42S22 Select Workflow_Property1.ky as Workflow_Property1_ky, Workflow_Property1.id as Workflow_Property1_id, Workflow_Property1.prop_Index as Workflow_Property1_prop_Index

Solution icon of googlegroups
Exception while executing statement : No operations allowed after connection closed.Connection was implicitly closed by the driver. errorCode: 0, sqlState: 08003 Select Review1.id as Review1_id, Review1.location as Review1_location, Review1

Stack trace

java.lang.RuntimeException: Exception while executing statement : Unique index or primary key violation: "CONSTRAINT_9D9B1_INDEX_F ON PUBLIC.ASSET_META(NAME) VALUES (CAST('SUFFIX' AS VARCHAR_IGNORECASE), 48)"; SQL statement:
insert into asset_meta (name, priority, value_type, description, label) values (?,?,?,?,?) [23505-188]
errorCode: 23505, sqlState: 23505
insert into asset_meta (name, priority, value_type, description, label) values (?,?,?,?,?)
jdbcParams:[SUFFIX,-1,1,SUFFIX,Suffix]
	at org.squeryl.internals.DatabaseAdapter$class._exec(DatabaseAdapter.scala:297)[org.squeryl.squeryl_2.11-0.9.5-7.jar:0.9.5-7]
	at org.squeryl.internals.DatabaseAdapter$class.exec(DatabaseAdapter.scala:349)[org.squeryl.squeryl_2.11-0.9.5-7.jar:0.9.5-7]
	at org.squeryl.adapters.H2Adapter.exec(H2Adapter.scala:22)[org.squeryl.squeryl_2.11-0.9.5-7.jar:0.9.5-7]
	at org.squeryl.internals.DatabaseAdapter$class.executeUpdateForInsert(DatabaseAdapter.scala:383)[org.squeryl.squeryl_2.11-0.9.5-7.jar:0.9.5-7]
	at org.squeryl.adapters.H2Adapter.executeUpdateForInsert(H2Adapter.scala:22)[org.squeryl.squeryl_2.11-0.9.5-7.jar:0.9.5-7]
Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "CONSTRAINT_9D9B1_INDEX_F ON PUBLIC.ASSET_META(NAME) VALUES (CAST('SUFFIX' AS VARCHAR_IGNORECASE), 48)"; SQL statement:
insert into asset_meta (name, priority, value_type, description, label) values (?,?,?,?,?) [23505-188]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)[com.h2database.h2-1.4.188.jar:1.4.188]
	at org.h2.message.DbException.get(DbException.java:179)[com.h2database.h2-1.4.188.jar:1.4.188]
	at org.h2.message.DbException.get(DbException.java:155)[com.h2database.h2-1.4.188.jar:1.4.188]
	at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:102)[com.h2database.h2-1.4.188.jar:1.4.188]
	at org.h2.mvstore.db.MVSecondaryIndex.checkUnique(MVSecondaryIndex.java:231)[com.h2database.h2-1.4.188.jar:1.4.188]

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

4 times, 4 days ago
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 4 weeks ago
148 more bugmates