org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "unique_document_id_rows_order" Detail: Key (document_id, rows_order)=(113306, 2) already exists. Error Code: 0

Stack Overflow | lucash | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Moving entity between two ordered lists in eclipselink

    Stack Overflow | 5 months ago | lucash
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "unique_document_id_rows_order" Detail: Key (document_id, rows_order)=(113306, 2) already exists. Error Code: 0

    Root Cause Analysis

    1. org.postgresql.util.PSQLException

      ERROR: duplicate key value violates unique constraint "unique_document_id_rows_order" Detail: Key (document_id, rows_order)=(113306, 2) already exists. Error Code: 0

      at org.springframework.orm.jpa.JpaTransactionManager.doCommit()
    2. Spring ORM
      JpaTransactionManager.doCommit
      1. org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:526)
      1 frame
    3. Spring Tx
      TransactionAspectSupport.invokeWithinTransaction
      1. org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
      2. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
      3. org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485)
      4. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
      4 frames
    4. Spring Aspects
      AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c
      1. org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:70)
      1 frame
    5. com.dbcentral.service
      DocumentService.addRow
      1. com.dbcentral.service.DocumentService.addRow(DocumentService.java:100)
      1 frame