org.jooq.exception.DataAccessException

SQL [insert into secrets (name, createdat, updatedat, description, createdby, updatedby, type, options) values (?, cast(? as timestamp), cast(? as timestamp), ?, ?, ?, ?, ?) returning secrets.id]; duplicate key value violates unique constraint "secrets_pkey"


Solutions on the web165

Solution icon of github
via GitHub by sureshg
, 7 months ago
SQL [insert into secrets (name, createdat, updatedat, description, createdby, updatedby, type, options) values (?, cast(? as timestamp), cast(? as timestamp), ?, ?, ?, ?, ?) returning secrets.id]; duplicate key value violates unique constraint "secrets_pkey"

Solution icon of github
SQL [insert into CLIENTS (NAME, CREATEDAT, UPDATEDAT, DESCRIPTION, CREATEDBY, UPDATEDBY, ENABLED, AUTOMATIONALLOWED, LASTSEEN) values (cast(? as varchar), cast(? as timestamp), cast(? as timestamp), cast(? as varchar), cast(? as varchar), cast(? as

Solution icon of github
via GitHub by joffotron
, 1 year ago
SQL [insert into GROUPS (ID, NAME, CREATEDAT, UPDATEDAT) values (cast(? as int), cast(? as varchar), cast(? as timestamp), cast(? as timestamp)), (cast(? as int), cast(? as varchar), cast(? as timestamp), cast(? as timestamp)), (cast(? as int), cast

Solution icon of googlegroups
via Google Groups by Matthew Halder, 11 months ago
SQL [insert into groups (id, name, createdat, updatedat) values (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint

Solution icon of googlegroups
via Google Groups by Unknown author, 2 months ago
), ?, ?, ?, cast(? as timestamp), ?, ?, cast(? as timestamp), ?, ?, ?, ?, ?, ?, ?, ?, ?) returning "public"."users"."id"]; ERROR: *null value in column "locale" violates not-null constraint*

Solution icon of github
via GitHub by phxql
, 1 year ago
SQL [insert into "PUBLIC"."TECHNOLOGY" ("ID", "TYPE", "PLAYER_ID", "LEVEL") values (cast(? as uuid), cast(? as int), cast(? as uuid), cast(? as int))]; Eindeutiger Index oder Primärschlüssel verletzt: "CONSTRAINT_INDEX_B ON PUBLIC.TECHNOLOGY

Solution icon of github
SQL [insert into "xxx"."sample" ("id", "name", "start_date", "end_date") values (cast(? as integerunsigned), cast(? as varchar), cast(? as date), cast(? as date))]; Unknown data type: "INTEGERUNSIGNED"; SQL statement: insert into "xxx"."sample" ("id

Solution icon of github
via GitHub by kamransaleem
, 2 months ago
SQL [insert into [physical_flow_lineage] ([described_flow_id], [contributor_flow_id], [description], [last_updated_by]) values (?, ?, ?, ?)]; Violation of PRIMARY KEY constraint 'physical_flow_lineage_pkey'. Cannot insert duplicate key in object 'dbo.physical_flow_lineage'. The duplicate key value is (37058, 81014).

Solution icon of github
via GitHub by michaelsproul
, 10 months ago
SQL [insert into "public"."message" ("metadata") values (cast(? as varchar))]; Batch entry 0 insert into "public"."message" ("metadata") values (cast(NULL as varchar)) was aborted: ERROR: column "metadata" is of type json but expression is of type character varying Hint: You will need to rewrite or cast the expression. Position: 258 Call getNextException to see the cause.

Solution icon of github
via GitHub by csstaub
, 10 months ago
SQL [update CLIENTS set CLIENTS.LASTSEEN = case when CLIENTS.LASTSEEN is null then cast(? as bigint) else greatest(CLIENTS.LASTSEEN, cast(? as timestamp)) end where CLIENTS.ID = cast(? as int)]; Cannot parse "TIMESTAMP" constant "1475185281"; SQL

Stack trace

  • org.jooq.exception.DataAccessException: SQL [insert into secrets (name, createdat, updatedat, description, createdby, updatedby, type, options) values (?, cast(? as timestamp), cast(? as timestamp), ?, ?, ?, ?, ?) returning secrets.id]; duplicate key value violates unique constraint "secrets_pkey" at com.impossibl.postgres.jdbc.ErrorUtils.makeSQLException(ErrorUtils.java:154) at com.impossibl.postgres.jdbc.ErrorUtils.makeSQLException(ErrorUtils.java:136) at com.impossibl.postgres.jdbc.PGConnectionImpl.execute(PGConnectionImpl.java:438) at com.impossibl.postgres.jdbc.PGStatement.executeStatement(PGStatement.java:375) at com.impossibl.postgres.jdbc.PGPreparedStatement.execute(PGPreparedStatement.java:261) at com.impossibl.postgres.jdbc.PGPreparedStatement.executeQuery(PGPreparedStatement.java:277) at com.impossibl.postgres.jdbc.PGPreparedStatement.executeQuery(PGPreparedStatement.java:92)

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

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.