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]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check if you're not creating unused SQL entities, as it might cause this exception.

Solutions on the web

via GitHub by grahamc
, 10 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_IGNORECASE), 48)"; SQL statement: insert into asset_meta (name, priority, value_type
via GitHub by grahamc
, 10 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 docker[5807]: insert into asset_meta (name, priority
via Google Groups by tenniscp25, 1 year ago
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
via Google Groups by Alec Wysoker, 6 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
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.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:102)
at org.h2.mvstore.db.MVSecondaryIndex.checkUnique(MVSecondaryIndex.java:231)

Users with the same issue

22 times, 1 day ago
2 times, 1 week ago
Once, 1 month ago
Once, 1 month ago
4 times, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.