org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "confirmemaildata_authenticateduser_id_key" Detail: Key (authenticateduser_id)=(5) already exists. Error Code: 0 Call: INSERT INTO CONFIRMEMAILDATA (CREATED, EXPIRES, TOKEN, AUTHENTICATEDUSER_ID) VALUES (?, ?, ?, ?) bind => [4 parameters bound] Query: InsertObjectQuery(edu.harvard.iq.dataverse.confirmemail.ConfirmEmailData@1a9cc595)

GitHub | kcondon | 5 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Email Verification: Server log error thrown if update email address before validate user and link not yet expired.

    GitHub | 5 months ago | kcondon
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "confirmemaildata_authenticateduser_id_key" Detail: Key (authenticateduser_id)=(5) already exists. Error Code: 0 Call: INSERT INTO CONFIRMEMAILDATA (CREATED, EXPIRES, TOKEN, AUTHENTICATEDUSER_ID) VALUES (?, ?, ?, ?) bind => [4 parameters bound] Query: InsertObjectQuery(edu.harvard.iq.dataverse.confirmemail.ConfirmEmailData@1a9cc595)
  2. 0

    Indexing: index all causes org.postgresql.util.PSQLException: ERROR: deadlock detected

    GitHub | 2 years ago | pdurbin
    org.postgresql.util.PSQLException: ERROR: deadlock detected Detail: Process 26300 waits for ShareLock on transaction 79290; blocked by process 26299. Process 26299 waits for ShareLock on transaction 79289; blocked by process 26300. Hint: See server log for query details. Error Code: 0 Call: UPDATE DVOBJECT SET PERMISSIONINDEXTIME = ? WHERE (ID = ?) bind => [2 parameters bound] Query: UpdateObjectQuery([Dataset id:9 ])
  3. 0

    The metadata could not be updated. Please contact support.

    GitHub | 2 years ago | sbarbosadataverse
    org.postgresql.util.PSQLException: ERROR: deadlock detected Detail: Process 21223 waits for ShareLock on transaction 107285; blocked by process 21227. Process 21227 waits for ShareLock on transaction 107286; blocked by process 21223. Hint: See server log for query details. Error Code: 0 Call: UPDATE DVOBJECT SET PERMISSIONINDEXTIME = ? WHERE (ID = ?) bind => [2 parameters bound] Query: UpdateObjectQuery([Dataset id:7 ])
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Delete File: Can't delete a restricted file where access has been granted.

    GitHub | 2 years ago | kcondon
    org.postgresql.util.PSQLException: ERROR: update or delete on table "dvobject" violates foreign key constraint "fk_roleassignment_definitionpoint_id" on table "roleassignment" Detail: Key (id)=(275) is still referenced from table "roleassignment". Error Code: 0 Call: DELETE FROM DVOBJECT WHERE (ID = ?) bind => [1 parameter bound] Query: DeleteObjectQuery([DataFile id:275 name:null])
  6. 0

    Code: adjust createAuthenticatedUser method to reject non unique usernames

    GitHub | 2 years ago | scolapasta
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "unq_authenticateduserlookup_0" Detail: Key (persistentuserid, authenticationproviderid)=(builtin, builtin) already exists. Error Code: 0 Call: INSERT INTO AUTHENTICATEDUSERLOOKUP (AUTHENTICATIONPROVIDERID, PERSISTENTUSERID, AUTHENTICATEDUSER_ID) VALUES (?, ?, ?) bind => [3 parameters bound] Query: InsertObjectQuery(edu.harvard.iq.dataverse.authorization.AuthenticatedUserLookup@1aac669)
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.postgresql.util.PSQLException

    ERROR: duplicate key value violates unique constraint "confirmemaildata_authenticateduser_id_key" Detail: Key (authenticateduser_id)=(5) already exists.

    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse()
  2. PostgreSQL JDBC Driver
    AbstractJdbc2Statement.executeUpdate
    1. org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2101)
    2. org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1834)
    3. org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    4. org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510)
    5. org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    6. org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:332)
    6 frames
  3. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor441.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:498)
    3 frames
  4. PostgreSQL JDBC Driver
    AbstractJdbc23PooledConnection$StatementHandler.invoke
    1. org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:453)
    1 frame
  5. com.sun.proxy
    $Proxy213.executeUpdate
    1. com.sun.proxy.$Proxy213.executeUpdate(Unknown Source)
    1 frame
  6. Embedded GlassFish Web
    PreparedStatementWrapper.executeUpdate
    1. com.sun.gjc.spi.base.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:125)
    1 frame
  7. EclipseLink (non-OSGi)
    EJBQueryImpl.getSingleResult
    1. org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:890)
    2. org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
    3. org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:631)
    4. org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
    5. org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
    6. org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:298)
    7. org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
    8. org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
    9. org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:377)
    10. org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:165)
    11. org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:180)
    12. org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:489)
    13. org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
    14. org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
    15. org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:301)
    16. org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
    17. org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
    18. org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798)
    19. org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
    20. org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
    21. org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
    22. org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
    23. org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
    24. org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1737)
    25. org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:226)
    26. org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:125)
    27. org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4207)
    28. org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1441)
    29. org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1587)
    30. org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:452)
    31. org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:863)
    32. org.eclipse.persistence.internal.jpa.QueryImpl.performPreQueryFlush(QueryImpl.java:963)
    33. org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:207)
    34. org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:517)
    35. org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:400)
    35 frames
  8. edu.harvard.iq
    ConfirmEmailServiceBean.beginConfirm
    1. edu.harvard.iq.dataverse.confirmemail.ConfirmEmailServiceBean.findSingleConfirmEmailDataByUser(ConfirmEmailServiceBean.java:175)
    2. edu.harvard.iq.dataverse.confirmemail.ConfirmEmailServiceBean.optionalConfirmEmailAddonMsg(ConfirmEmailServiceBean.java:220)
    3. edu.harvard.iq.dataverse.confirmemail.ConfirmEmailServiceBean.sendConfirm(ConfirmEmailServiceBean.java:78)
    4. edu.harvard.iq.dataverse.confirmemail.ConfirmEmailServiceBean.beginConfirm(ConfirmEmailServiceBean.java:53)
    4 frames
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  10. Embedded GlassFish Web
    EjbInvocation.proceed
    1. org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
    2. org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
    3. com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
    4. com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
    5. com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
    6. com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
    6 frames
  11. Weld Implementation
    SessionBeanInterceptor.aroundInvoke
    1. org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
    2. org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
    2 frames
  12. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:498)
    3 frames
  13. Embedded GlassFish Web
    SystemInterceptorProxy.aroundInvoke
    1. com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
    2. com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
    3. com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
    4. com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
    5. com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
    5 frames
  14. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:498)
    3 frames
  15. Embedded GlassFish Web
    EJBLocalObjectInvocationHandlerDelegate.invoke
    1. com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
    2. com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
    3. com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
    4. com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
    5. com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
    6. com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
    7. com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
    7 frames
  16. com.sun.proxy
    $Proxy1028.beginConfirm
    1. com.sun.proxy.$Proxy1028.beginConfirm(Unknown Source)
    1 frame
  17. edu.harvard.iq
    BuiltinUserPage.save
    1. edu.harvard.iq.dataverse.confirmemail.__EJB31_Generated__ConfirmEmailServiceBean__Intf____Bean__.beginConfirm(Unknown Source)
    2. edu.harvard.iq.dataverse.authorization.providers.builtin.BuiltinUserPage.save(BuiltinUserPage.java:505)
    2 frames
  18. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  19. EL
    MethodExpressionImpl.invoke
    1. com.sun.el.parser.AstValue.invoke(AstValue.java:289)
    2. com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
    2 frames
  20. Weld Implementation
    WeldMethodExpression.invoke
    1. org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
    2. org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
    2 frames
  21. JSF
    TagMethodExpression.invoke
    1. com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    1 frame
  22. JavaEE 7
    MethodBindingMethodExpressionAdapter.invoke
    1. javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
    1 frame
  23. JSF
    ActionListenerImpl.processAction
    1. com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    1 frame
  24. JavaEE 7
    UIViewRoot.processApplication
    1. javax.faces.component.UICommand.broadcast(UICommand.java:315)
    2. javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
    3. javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
    3 frames
  25. JSF
    LifecycleImpl.execute
    1. com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    2. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    3. com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
    3 frames
  26. JavaEE 7
    FacesServlet.service
    1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
    1 frame
  27. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
    2. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
    3. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    3 frames
  28. Tyrus Servlet Bundle
    TyrusServletFilter.doFilter
    1. org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:295)
    1 frame
  29. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    2 frames
  30. org.ocpsoft.rewrite
    RewriteFilter.doFilter
    1. org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:205)
    1 frame
  31. Glassfish Core
    StandardPipeline.invoke
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
    5. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    6. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
    6 frames
  32. Glassfish
    WebPipeline.invoke
    1. com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
    1 frame
  33. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
    2. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    3. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
    4. org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:412)
    5. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
    5 frames
  34. Kernel Classes
    ContainerMapper.service
    1. com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    2. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    2 frames
  35. Grizzly Server
    HttpServerFilter.handleRead
    1. org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
    2. org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    3. org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    3 frames
  36. Grizzly
    AbstractThreadPool$Worker.run
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    7. org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
    8. org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    9. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    10. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    11. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    12. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    13. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    13 frames
  37. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame