org.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.fisheye.user.model.RecentlyVisitedUser]

Atlassian JIRA | Cezary Zawadka | 1 year ago
  1. 0

    RecentlyVisitedManager.addItemToHistory has race condition which handles org.hibernate.exception.ConstraintViolationException (FE-5729) but it still reports SQLIntegrityConstraintViolationException: {code} 2015-07-13 08:27:53,478 ERROR [ThreadPool3 ] org.hibernate.event.def.AbstractFlushingEventListener AbstractFlushingEventListener-performExecutions - Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.fisheye.user.model.RecentlyVisitedUser] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2438) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2858) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:178) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137) at com.cenqua.crucible.hibernate.SessionState.commit(SessionState.java:127) at com.cenqua.crucible.hibernate.SessionState.commitAllTx(SessionState.java:82) at com.cenqua.crucible.hibernate.SessionState.commitTx(SessionState.java:74) at com.cenqua.crucible.hibernate.HibernateUtil.commitTransaction(HibernateUtil.java:319) at com.atlassian.fisheye.user.DefaultRecentlyVisitedManager$1.run(DefaultRecentlyVisitedManager.java:106) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (CRUCIBLE.SYS_C009680) violated at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350) at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2418) ... 22 more {code}

    Atlassian JIRA | 1 year ago | Cezary Zawadka
    org.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.fisheye.user.model.RecentlyVisitedUser]
  2. 0

    RecentlyVisitedManager.addItemToHistory has race condition which handles org.hibernate.exception.ConstraintViolationException (FE-5729) but it still reports SQLIntegrityConstraintViolationException: {code} 2015-07-13 08:27:53,478 ERROR [ThreadPool3 ] org.hibernate.event.def.AbstractFlushingEventListener AbstractFlushingEventListener-performExecutions - Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.fisheye.user.model.RecentlyVisitedUser] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2438) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2858) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:178) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137) at com.cenqua.crucible.hibernate.SessionState.commit(SessionState.java:127) at com.cenqua.crucible.hibernate.SessionState.commitAllTx(SessionState.java:82) at com.cenqua.crucible.hibernate.SessionState.commitTx(SessionState.java:74) at com.cenqua.crucible.hibernate.HibernateUtil.commitTransaction(HibernateUtil.java:319) at com.atlassian.fisheye.user.DefaultRecentlyVisitedManager$1.run(DefaultRecentlyVisitedManager.java:106) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (CRUCIBLE.SYS_C009680) violated at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350) at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2418) ... 22 more {code}

    Atlassian JIRA | 1 year ago | Cezary Zawadka
    org.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.fisheye.user.model.RecentlyVisitedUser]
  3. 0

    Cannot insert NULL into column

    Stack Overflow | 5 years ago | Scott
    java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("SCHEMA"."TABLE_1"."COL_A")
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    jdbc implement test I get java.sql.SQLIntegrityConstraintViolationException: ORA-00001: 违反唯一约束条件 (db.OAUTH_CLIENT_DETAILS_PK)

    GitHub | 2 years ago | jast90
    java.sql.SQLIntegrityConstraintViolationException: ORA-00001: 违反唯一约束条件 (FCNJAVA.OAUTH_CLIENT_DETAILS_PK)
  6. 0

    Constraint violation using admin gui

    GitHub | 2 years ago | digitalfox
    javax.persistence.RollbackException: Error while committing the transaction

  1. balintn 4 times, last 2 weeks ago
  2. balintn 2 times, last 3 months ago
  3. mellson 8 times, last 3 months ago
  4. mellson 2 times, last 3 months ago
7 unregistered visitors
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. java.sql.SQLIntegrityConstraintViolationException

    ORA-00001: unique constraint (CRUCIBLE.SYS_C009680) violated

    at oracle.jdbc.driver.T4CTTIoer.processError()
  2. Oracle jdbc
    OraclePreparedStatementWrapper.executeUpdate
    1. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
    2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    3. oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
    4. oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
    5. oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
    6. oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
    7. oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
    8. oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)
    9. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
    10. oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
    11. oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
    12. oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
    12 frames
  3. BoneCP :: Core Library
    PreparedStatementHandle.executeUpdate
    1. com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203)
    1 frame
  4. Hibernate
    AbstractEntityPersister.insert
    1. org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46)
    2. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2418)
    3. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2858)
    3 frames
  5. Hibernate
    EntityInsertAction.execute
    1. org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
    1 frame
  6. Hibernate
    ActionQueue.executeActions
    1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
    2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)
    3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:178)
    3 frames
  7. Hibernate
    SessionImpl.managedFlush
    1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
    4. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
    4 frames
  8. Hibernate
    JDBCTransaction.commit
    1. org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
    1 frame
  9. com.cenqua.crucible
    HibernateUtil.commitTransaction
    1. com.cenqua.crucible.hibernate.SessionState.commit(SessionState.java:127)
    2. com.cenqua.crucible.hibernate.SessionState.commitAllTx(SessionState.java:82)
    3. com.cenqua.crucible.hibernate.SessionState.commitTx(SessionState.java:74)
    4. com.cenqua.crucible.hibernate.HibernateUtil.commitTransaction(HibernateUtil.java:319)
    4 frames
  10. com.atlassian.fisheye
    DefaultRecentlyVisitedManager$1.run
    1. com.atlassian.fisheye.user.DefaultRecentlyVisitedManager$1.run(DefaultRecentlyVisitedManager.java:106)
    1 frame
  11. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    5. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    7. java.lang.Thread.run(Thread.java:745)
    7 frames