Uploaded image for project: 'FishEye'
  1. FishEye
  2. FE-5730

ConstraintViolationException caused by RecentlyVisitedManager.addItemToHistory still visible in the logs

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Symptom Severity:
      Minor
    • Epic Link:
    • Regular Expression:
      org\.hibernate\.exception\.ConstraintViolationException: could not insert: \[com\.atlassian\.fisheye\.user\.model\.RecentlyVisitedUser\]
    • UIS:
      11

      Description

      RecentlyVisitedManager.addItemToHistory has race condition which handles org.hibernate.exception.ConstraintViolationException (FE-5729) but it still reports SQLIntegrityConstraintViolationException:

      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
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Last commented:
                  2 years, 17 weeks, 1 day ago