org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_otqx1o0prrhjwxav4bbxvwge2" Detail: Key (username)=(ksnortum) already exists.

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

Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: <postgresql.version>9.4.1211</postgresql.version>

Solutions on the web

via Coderanch by Knute Snortum, 1 year ago
ERROR: duplicate key value violates unique constraint "uk_otqx1o0prrhjwxav4bbxvwge2" Detail: Key (username)=(ksnortum) already exists.
via GitHub by priitl
, 1 year ago
ERROR: duplicate key value violates unique constraint "jhi_user_email_key" Detail: Key (email)=(user@localhost) already exists.
via GitHub by dotjorgeu
, 2 years ago
ERROR: insert or update on table "publishing_bundle_environment" violates foreign key constraint "fk_bundle_id" Detail: Key (bundle_id)=(dbc71cca-29ab-47b4-b33a-50de3549da1f) is not present in table "publishing_bundle".
via GitHub by littlebunch
, 1 year ago
ERROR: null value in column "name" violates n ot-null constraint Detail: Failing row contains (308641, 0, null, null, org.bbop.apollo.UserOrgan ismPreference, 3, Scaffold1069, 6, t).
via Google Groups by Gustavo, 3 months ago
ERROR: update o delete en «item» viola la llave foránea «communities2item_item_id_fkey» en la tabla «communities2item» Detail: La llave (item_id)=(1984) todavía es referida desde la tabla «communities2item».
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_otqx1o0prrhjwxav4bbxvwge2" Detail: Key (username)=(ksnortum) already exists.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)

Users with the same issue

9 times, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
3 times, 1 year ago
100 more bugmates

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