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"

GitHub | sureshg | 4 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Postgresql unit test are failing

    GitHub | 4 months ago | sureshg
    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"
  2. 0

    Failing unit test? testEscaping(com.impossibl.postgres.jdbc.DatabaseMetaDataTest)

    GitHub | 1 year ago | dstipp
    com.impossibl.postgres.jdbc.PGSQLSimpleException: LIKE pattern must not end with escape character
  3. 0

    Problem with generated keys

    GitHub | 8 months ago | obraliar
    com.impossibl.postgres.jdbc.PGSQLSimpleException: column "id" does not exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. PGJDBC-NG
      PGPreparedStatement.executeQuery
      1. com.impossibl.postgres.jdbc.ErrorUtils.makeSQLException(ErrorUtils.java:154)
      2. com.impossibl.postgres.jdbc.ErrorUtils.makeSQLException(ErrorUtils.java:136)
      3. com.impossibl.postgres.jdbc.PGConnectionImpl.execute(PGConnectionImpl.java:438)
      4. com.impossibl.postgres.jdbc.PGStatement.executeStatement(PGStatement.java:375)
      5. com.impossibl.postgres.jdbc.PGPreparedStatement.execute(PGPreparedStatement.java:261)
      6. com.impossibl.postgres.jdbc.PGPreparedStatement.executeQuery(PGPreparedStatement.java:277)
      7. com.impossibl.postgres.jdbc.PGPreparedStatement.executeQuery(PGPreparedStatement.java:92)
      7 frames