org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "webapp_pkey" Detail: Key (webapp_id)=(12) already exists.


Samebug tips

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>


7 months ago
Expert tip

Solutions on the web

Solution icon of googlegroups
via Google Groups by Emmanuel Wilson, 1 year ago
ERROR: duplicate key value violates unique constraint "webapp_pkey" Detail: Key (webapp_id)=(12) already exists.

Solution icon of stackoverflow
via Stack Overflow by eml
, 1 year ago
ERROR: duplicate key value violates unique constraint "webapp_pkey" Detail: Key (webapp_id)=(12) already exists.

Solution icon of stackoverflow
ERROR: duplicate key value violates unique constraint "type_pkey" Detail: Key (typeid)=(DETAIL) already exists.

Solution icon of coderanch
via Coderanch by Knute Snortum, 1 year ago
ERROR: duplicate key value violates unique constraint "uk_otqx1o0prrhjwxav4bbxvwge2" Detail: Key (username)=(ksnortum) already exists.

Solution icon of github
via GitHub by ferrys
, 1 month ago
ERROR: duplicate key value violates unique constraint "one_draft_version_per_dataset" Detail: Key (dataset_id)=(225) already exists.

Solution icon of github
ERROR: duplicate key value violates unique constraint "unq_authenticateduserlookup_0" Detail: Key (persistentuserid, authenticationproviderid)=(builtin, builtin) already exists.

Solution icon of github
ERROR: duplicate key value violates unique constraint "resourceuser_pk" Detail: Key (id)=(2) already exists.

Solution icon of github
ERROR: duplicate key value violates unique constraint "mappedphysicalcard_mbankcardnumber" Detail: Key (mbankcardnumber)=(String) already exists.

Solution icon of github
ERROR: duplicate key value violates unique constraint "uk_247lgirehl8i2vuanyfjnuyjb" Detail: Key (series_fk, sop_iuid)=(69117, 1.3.46.670589.33.1.38536390451220937028.25875954354275081131) already exists.

Solution icon of github
ERROR: duplicate key value violates unique constraint "uk_t1uhb1suiiqffhsv9eaopeevs" Detail: Key (view_id, series_fk)=(hideRejected, 333) already exists.

Stack trace

org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "webapp_pkey"
  Detail: Key (webapp_id)=(12) already exists.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	at org.dspace.storage.rdbms.DatabaseManager.doInsertPostgres(DatabaseManager.java:1743)
	at org.dspace.storage.rdbms.DatabaseManager.insert(DatabaseManager.java:711)
	at org.dspace.storage.rdbms.DatabaseManager.create(DatabaseManager.java:476)
	at org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:80)
	at org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceContextListener.java:128)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5027)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5525)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	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)

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

Samebug visitor profile picture
Unknown user
Once, 1 year ago
10 times, 1 year ago
4 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
16 times, 2 months ago
101 more bugmates