org.postgresql.util.PSQLException: ERROR: duplicate key ....

Oracle Community | c_krebs | 6 years 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

    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])
  2. 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)
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Server log error: Null value in createdate for DataFile

    GitHub | 2 years ago | kcondon
    org.postgresql.util.PSQLException: ERROR: null value in column "createdate" violates not-null constraint Detail: Failing row contains (2668843, DataFile, null, null, 2015-04-21 21:26:42.788, null, 2015-04-21 21:21:37.347, null, null, 64805, null). Error Code: 0 Call: INSERT INTO DVOBJECT (CREATEDATE, INDEXTIME, MODIFICATIONTIME, PERMISSIONINDEXTIME, PERMISSIONMODIFICATIONTIME, PUBLICATIONDATE, CREATOR_ID, OWNER_ID, RELEASEUSER_ID, DTYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [10 parameters bound] Query: InsertObjectQuery([DataFile id:null name:null])
  5. 0

    shapefile upload not working on prod

    GitHub | 2 years ago | raprasad
    org.postgresql.util.PSQLException: ERROR: null value in column "createdate" violates not-null constraint Detail: Failing row contains (2676547, DataFile, null, null, 2015-05-14 11:22:16.822, null, 2015-05-14 11:22:11.256, null, null, 2670631, null). Error Code: 0 Call: INSERT INTO DVOBJECT (CREATEDATE, INDEXTIME, MODIFICATIONTIME, PERMISSIONINDEXTIME, PERMISSIONMODIFICATIONTIME, PUBLICATIONDATE, CREATOR_ID, OWNER_ID, RELEASEUSER_ID, DTYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [10 parameters bound] Query: InsertObjectQuery([DataFile id:null name:null])

    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 ....

      at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion()
    2. EclipseLink (non-OSGi)
      JTASynchronizationListener.beforeCompletion
      1. org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:331)
      2. org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:157)
      3. org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
      3 frames
    3. Embedded GlassFish Web
      MessageBeanListenerImpl.afterMessageDelivery
      1. com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:99)
      2. com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:158)
      3. com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2561)
      4. com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:279)
      5. com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:250)
      6. com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
      7. com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:319)
      8. com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:173)
      9. com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:873)
      10. com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5115)
      11. com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4880)
      12. com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1207)
      13. com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1180)
      14. com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:86)
      14 frames
    4. Connectors Inbound Support
      MessageEndpointInvocationHandler.invoke
      1. com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:143)
      1 frame
    5. Unknown
      $Proxy261.afterDelivery
      1. $Proxy261.afterDelivery(Unknown Source)
      1 frame
    6. com.sun.messaging
      OnMessageRunner.run
      1. com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:328)
      1 frame
    7. Embedded GlassFish Web
      OneWork.doWork
      1. com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
      1 frame
    8. glassfish-corba-orbgeneric
      ThreadPoolImpl$WorkerThread.performWork
      1. com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
      1 frame