org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "reports_hash_expr_idx" Detail: Key (encode(hash, 'hex'::text))=(66929dd40d99b8addcb9f42e02f51675cd6a2357) 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 JIRA by Andreas Unterkircher, 1 year ago
ERROR: duplicate key value violates unique constraint "reports_hash_expr_idx" Detail: Key (encode(hash, 'hex'::text))=(66929dd40d99b8addcb9f42e02f51675cd6a2357) already exists.
via Atlassian JIRA by Dave Loeng [Atlassian], 1 year ago
ERROR: relation "bandana" does not exist
via Atlassian JIRA by Dave Loeng [Atlassian], 1 year ago
ERROR: relation "bandana" does not exist
via Atlassian JIRA by Adalberto Schneider [Atlassian], 1 year ago
ERROR: update or delete on table "content" violates foreign key constraint "fka768048734a4917e" on table "imagedetails" Detail: Key (contentid)=(5799948) is still referenced from table "imagedetails".
via GitHub by Kerroin
, 9 months ago
ERROR: update or delete on table "domains" violates foreign key constraint "fklk2xews8beasik8x7b7epmxjt" on table "badge_types" Detail: Key (id)=(92) is still referenced from table "badge_types".
via https://bugzilla.redhat.com/bugzilla/ by Jeff Weiss, 1 year ago
ERROR: syntax error at or near ")"
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "reports_hash_expr_idx" Detail: Key (encode(hash, 'hex'::text))=(66929dd40d99b8addcb9f42e02f51675cd6a2357) already exists.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at clojure.java.jdbc$db_do_prepared_return_keys$exec_and_return_keys__20693.invoke(jdbc.clj:727)
at clojure.java.jdbc$db_do_prepared_return_keys.invokeStatic(jdbc.clj:742)
at clojure.java.jdbc$db_do_prepared_return_keys.invoke(jdbc.clj:714)
at clojure.java.jdbc$multi_insert_helper$fn__20747.invoke(jdbc.clj:937)
at clojure.core$map$fn__4785.invoke(core.clj:2646)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:521)
at clojure.core$seq__4357.invokeStatic(core.clj:137)
at clojure.core$dorun.invokeStatic(core.clj:3024)
at clojure.core$doall.invokeStatic(core.clj:3039)
at clojure.core$doall.invoke(core.clj:3039)
at clojure.java.jdbc$multi_insert_helper.invokeStatic(jdbc.clj:936)
at clojure.java.jdbc$multi_insert_helper.invoke(jdbc.clj:931)
at clojure.java.jdbc$insert_helper$fn__20750.invoke(jdbc.clj:947)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:620)
at clojure.java.jdbc$db_transaction_STAR_.doInvoke(jdbc.clj:568)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.java.jdbc$insert_helper.invokeStatic(jdbc.clj:947)
at clojure.java.jdbc$insert_helper.invoke(jdbc.clj:940)
at clojure.java.jdbc$insert_BANG_.invokeStatic(jdbc.clj:1037)
at clojure.java.jdbc$insert_BANG_.doInvoke(jdbc.clj:1024)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:650)
at clojure.core$apply.invoke(core.clj:641)
at puppetlabs.puppetdb.jdbc$insert_BANG_.invokeStatic(jdbc.clj:64)
at puppetlabs.puppetdb.jdbc$insert_BANG_.doInvoke(jdbc.clj:57)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at puppetlabs.puppetdb.scf.storage$eval35201$add_report_BANG__STAR___35206$fn__35207$fn__35208$fn__35210.invoke(storage.clj:1260)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:620)
at clojure.java.jdbc$db_transaction_STAR_.doInvoke(jdbc.clj:568)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at puppetlabs.puppetdb.scf.storage$eval35201$add_report_BANG__STAR___35206$fn__35207$fn__35208.invoke(storage.clj:1236)
at puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)
at puppetlabs.puppetdb.scf.storage$eval35201$add_report_BANG__STAR___35206$fn__35207.invoke(storage.clj:1229)
at puppetlabs.puppetdb.scf.storage$eval35201$add_report_BANG__STAR___35206.invoke(storage.clj:1221)
at puppetlabs.puppetdb.scf.storage$eval35437$add_report_BANG___35442$fn__35443.invoke(storage.clj:1400)
at puppetlabs.puppetdb.scf.storage$eval35437$add_report_BANG___35442.invoke(storage.clj:1396)
at puppetlabs.puppetdb.command$store_report_STAR_$fn__40763.invoke(command.clj:331)
at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__21230$fn__21231.invoke(jdbc.clj:306)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:595)
at clojure.java.jdbc$db_transaction_STAR_.doInvoke(jdbc.clj:568)
at clojure.lang.RestFn.invoke(RestFn.java:464)
at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__21230.invoke(jdbc.clj:305)
at puppetlabs.puppetdb.jdbc$eval21204$retry_sql_STAR___21209$fn__21210$fn__21211.invoke(jdbc.clj:283)
at puppetlabs.puppetdb.jdbc$eval21204$retry_sql_STAR___21209$fn__21210.invoke(jdbc.clj:282)
at puppetlabs.puppetdb.jdbc$eval21204$retry_sql_STAR___21209.invoke(jdbc.clj:273)
at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invokeStatic(jdbc.clj:303)
at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:298)
at puppetlabs.puppetdb.command$store_report_STAR_.invokeStatic(command.clj:329)
at puppetlabs.puppetdb.command$store_report_STAR_.invoke(command.clj:324)
at puppetlabs.puppetdb.command$store_report.invokeStatic(command.clj:348)
at puppetlabs.puppetdb.command$store_report.invoke(command.clj:336)
at puppetlabs.puppetdb.command$process_command_BANG_.invokeStatic(command.clj:370)
at puppetlabs.puppetdb.command$process_command_BANG_.invoke(command.clj:363)
at puppetlabs.puppetdb.command$process_command_and_respond_BANG_.invokeStatic(command.clj:415)
at puppetlabs.puppetdb.command$process_command_and_respond_BANG_.invoke(command.clj:413)
at puppetlabs.puppetdb.command$reify__40907$service_fnk__11356__auto___positional$reify__40918$fn__40921.invoke(command.clj:451)
at puppetlabs.puppetdb.mq_listener$reify__41157$service_fnk__11356__auto___positional$reify__41167.process_message(mq_listener.clj:412)
at puppetlabs.puppetdb.mq_listener$reify__41157$service_fnk__11356__auto___positional$reify__41167$process_msg__41168.invoke(mq_listener.clj:380)
at puppetlabs.puppetdb.mq_listener$wrap_with_discard$fn__40983$fn__40985.invoke(mq_listener.clj:228)
at puppetlabs.puppetdb.mq_listener.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)
at puppetlabs.puppetdb.mq_listener$wrap_with_discard$fn__40983.invoke(mq_listener.clj:227)
at puppetlabs.puppetdb.mq_listener$wrap_with_exception_handling$fn__40971$fn__40973.invoke(mq_listener.clj:182)
at puppetlabs.puppetdb.mq_listener.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)
at puppetlabs.puppetdb.mq_listener$wrap_with_exception_handling$fn__40971.invoke(mq_listener.clj:181)
at puppetlabs.puppetdb.mq_listener$wrap_with_command_parser$fn__40979.invoke(mq_listener.clj:204)
at puppetlabs.puppetdb.mq_listener$wrap_with_meter$fn__40963.invoke(mq_listener.clj:142)
at puppetlabs.puppetdb.mq_listener$wrap_with_thread_name$fn__40990.invoke(mq_listener.clj:243)
at puppetlabs.puppetdb.mq_listener$start_receiver$reify__41150.onMessage(mq_listener.clj:360)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1401)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

11 times, 1 month ago
Once, 7 months ago
12 times, 5 months ago
3 times, 11 months ago
Once, 6 months ago
101 more bugmates

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