org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord#3 60475]; SQL []; integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA; nested exception is java.sql.SQLExceptio n: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA

Atlassian JIRA | Piyawoot Songsiritat [Atlassian] | 5 years ago
  1. 0

    - Fill up JIRA server data with a server that has high number of group memberships - Click "Next" to start the sync. - While the sync is happening, refresh the browser two times (leave a 5 second interval between refreshes) *Expected*: Sync page to load and continue to sync. Next button to be disabled until the sync finishes, status message to change to state that synchronization has finished. *Actual*: Sync page loads, status message no longer updates and the Next button is enabled (even though the sync is still occurring in the background). Confluence start with the admin user logged in but the screen states that it does not have permissions to access Confluence. This is due to the fact that the sync is not finished. Notes: - When the page is reloaded, there is an exception that is thrown in the log. - After the sync finishes, admin user is able to load Confluence normally. - The same thing happens if browser is closed and reopened. - Screen recording: http://screencast.com/t/Cedb0W7E5 {code} 2011-08-01 10:35:06,067 INFO [Long running task: Synchronising JIRA Directory] [atlassian.crowd.directory.DbCachingRemoteChangeOperations] addUserMembershipsForG roup added [ 9 ] user members to [ group224 ] in [ 53ms ] 2011-08-01 10:35:06,168 ERROR [Long running task: Unmigrated wiki markup migration Task] [sf.hibernate.util.JDBCExceptionReporter] logExceptions integrity constr aint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA -- referer: http://localhost:8089/confluence5/setup/connecttojirasyncdirectory-start.action | url: /confluence5/setup/finishsetup.action | userName: anonymous | action: finishsetup 2011-08-01 10:35:06,178 ERROR [Long running task: Unmigrated wiki markup migration Task] [sf.hibernate.impl.SessionImpl] execute Could not synchronize database s tate with session -- referer: http://localhost:8089/confluence5/setup/connecttojirasyncdirectory-start.action | url: /confluence5/setup/finishsetup.action | userName: anonymous | action: finishsetup 2011-08-01 10:35:06,179 ERROR [Long running task: Unmigrated wiki markup migration Task] [xhtml.migration.macro.RemigrationLongRunningTask] runInternal An error occurred during the long running macro migration task -- referer: http://localhost:8089/confluence5/setup/connecttojirasyncdirectory-start.action | url: /confluence5/setup/finishsetup.action | userName: anonymous | action: finishsetup org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord#3 60475]; SQL []; integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA; nested exception is java.sql.SQLExceptio n: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.orm.hibernate.HibernateTransactionManager.convertJdbcAccessException(HibernateTransactionManager.java:619) at org.springframework.orm.hibernate.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:605) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:518) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy24.store(Unknown Source) at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.store(ConfluenceCachingBandanaPersister.java:130) at com.atlassian.bandana.DefaultBandanaManager.setValue(DefaultBandanaManager.java:48) at com.atlassian.confluence.content.render.xhtml.migration.macro.MacroMigrationService.setMigrationRequired(MacroMigrationService.java:201) at com.atlassian.confluence.content.render.xhtml.migration.macro.RemigrationLongRunningTask.runInternal(RemigrationLongRunningTask.java:79) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.sql.SQLException: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA at org.hsqldb.jdbc.Util.sqlException(Util.java:215) at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStatement.java:4613) at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(JDBCPreparedStatement.java:308) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105) at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2447) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2433) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2390) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2259) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:510) ... 19 more Caused by: org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA at org.hsqldb.error.Error.error(Error.java:131) at org.hsqldb.Constraint.getException(Constraint.java:913) at org.hsqldb.index.IndexAVLMemory.insert(IndexAVLMemory.java:236) at org.hsqldb.persist.RowStoreAVL.indexRow(RowStoreAVL.java:171) at org.hsqldb.TransactionManagerMVCC.addInsertAction(TransactionManagerMVCC.java:402) at org.hsqldb.Session.addInsertAction(Session.java:433) at org.hsqldb.Table.insertSingleRow(Table.java:2500) at org.hsqldb.StatementDML.insertSingleRow(StatementDML.java:820) at org.hsqldb.StatementInsert.getResult(StatementInsert.java:131) at org.hsqldb.StatementDMQL.execute(StatementDMQL.java:190) at org.hsqldb.Session.executeCompiledStatement(Session.java:1300) at org.hsqldb.Session.execute(Session.java:960) at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStatement.java:4605) ... 31 more {code}

    Atlassian JIRA | 5 years ago | Piyawoot Songsiritat [Atlassian]
    org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord#3 60475]; SQL []; integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA; nested exception is java.sql.SQLExceptio n: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA
  2. 0

    - Fill up JIRA server data with a server that has high number of group memberships - Click "Next" to start the sync. - While the sync is happening, refresh the browser two times (leave a 5 second interval between refreshes) *Expected*: Sync page to load and continue to sync. Next button to be disabled until the sync finishes, status message to change to state that synchronization has finished. *Actual*: Sync page loads, status message no longer updates and the Next button is enabled (even though the sync is still occurring in the background). Confluence start with the admin user logged in but the screen states that it does not have permissions to access Confluence. This is due to the fact that the sync is not finished. Notes: - When the page is reloaded, there is an exception that is thrown in the log. - After the sync finishes, admin user is able to load Confluence normally. - The same thing happens if browser is closed and reopened. - Screen recording: http://screencast.com/t/Cedb0W7E5 {code} 2011-08-01 10:35:06,067 INFO [Long running task: Synchronising JIRA Directory] [atlassian.crowd.directory.DbCachingRemoteChangeOperations] addUserMembershipsForG roup added [ 9 ] user members to [ group224 ] in [ 53ms ] 2011-08-01 10:35:06,168 ERROR [Long running task: Unmigrated wiki markup migration Task] [sf.hibernate.util.JDBCExceptionReporter] logExceptions integrity constr aint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA -- referer: http://localhost:8089/confluence5/setup/connecttojirasyncdirectory-start.action | url: /confluence5/setup/finishsetup.action | userName: anonymous | action: finishsetup 2011-08-01 10:35:06,178 ERROR [Long running task: Unmigrated wiki markup migration Task] [sf.hibernate.impl.SessionImpl] execute Could not synchronize database s tate with session -- referer: http://localhost:8089/confluence5/setup/connecttojirasyncdirectory-start.action | url: /confluence5/setup/finishsetup.action | userName: anonymous | action: finishsetup 2011-08-01 10:35:06,179 ERROR [Long running task: Unmigrated wiki markup migration Task] [xhtml.migration.macro.RemigrationLongRunningTask] runInternal An error occurred during the long running macro migration task -- referer: http://localhost:8089/confluence5/setup/connecttojirasyncdirectory-start.action | url: /confluence5/setup/finishsetup.action | userName: anonymous | action: finishsetup org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord#3 60475]; SQL []; integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA; nested exception is java.sql.SQLExceptio n: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.orm.hibernate.HibernateTransactionManager.convertJdbcAccessException(HibernateTransactionManager.java:619) at org.springframework.orm.hibernate.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:605) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:518) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy24.store(Unknown Source) at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.store(ConfluenceCachingBandanaPersister.java:130) at com.atlassian.bandana.DefaultBandanaManager.setValue(DefaultBandanaManager.java:48) at com.atlassian.confluence.content.render.xhtml.migration.macro.MacroMigrationService.setMigrationRequired(MacroMigrationService.java:201) at com.atlassian.confluence.content.render.xhtml.migration.macro.RemigrationLongRunningTask.runInternal(RemigrationLongRunningTask.java:79) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.sql.SQLException: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA at org.hsqldb.jdbc.Util.sqlException(Util.java:215) at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStatement.java:4613) at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(JDBCPreparedStatement.java:308) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105) at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2447) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2433) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2390) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2259) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:510) ... 19 more Caused by: org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA at org.hsqldb.error.Error.error(Error.java:131) at org.hsqldb.Constraint.getException(Constraint.java:913) at org.hsqldb.index.IndexAVLMemory.insert(IndexAVLMemory.java:236) at org.hsqldb.persist.RowStoreAVL.indexRow(RowStoreAVL.java:171) at org.hsqldb.TransactionManagerMVCC.addInsertAction(TransactionManagerMVCC.java:402) at org.hsqldb.Session.addInsertAction(Session.java:433) at org.hsqldb.Table.insertSingleRow(Table.java:2500) at org.hsqldb.StatementDML.insertSingleRow(StatementDML.java:820) at org.hsqldb.StatementInsert.getResult(StatementInsert.java:131) at org.hsqldb.StatementDMQL.execute(StatementDMQL.java:190) at org.hsqldb.Session.executeCompiledStatement(Session.java:1300) at org.hsqldb.Session.execute(Session.java:960) at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStatement.java:4605) ... 31 more {code}

    Atlassian JIRA | 5 years ago | Piyawoot Songsiritat [Atlassian]
    org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord#3 60475]; SQL []; integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA; nested exception is java.sql.SQLExceptio n: integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA
  3. 0

    foreign key no parent error

    Stack Overflow | 5 years ago | The Thom
    org.springframework.dao.DataIntegrityViolationException: could not insert: [com.heavyweightsoftware.leal.model.schedule.Event]; SQL [insert into EVENT (ID, END_TIME, EVENT_ID, EVENT_NAME, LOCATION, SCHEDULE_ID, START_TIME) values (default, ?, ?, ?, ?, ?, ?)]; constraint [FK3F47A7AA91E64F]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [com.heavyweightsoftware.leal.model.schedule.Event]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HSQLDB: weird "unique constraint or index violation" with data read from CSV

    Stack Overflow | 6 years ago | Ondra Žižka
    java.sql.SQLException: integrity constraint violation: unique constraint or index violation: SYS_IDX_10027
  6. 0

    Exception when sending initial load

    symmetricds | 6 years ago | yoxel
    java.sql.SQLException: integrity constraint violation: foreign key no parent; SYS_FK_10059 table: CATEGORY
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.hsqldb.HsqlException

    integrity constraint violation: unique constraint or index violation; BANDANA_UNIQUE_KEY table: BANDANA

    at org.hsqldb.error.Error.error()
  2. HyperSQL Database
    Error.error
    1. org.hsqldb.error.Error.error(Error.java:131)
    1 frame
  3. HSQLDB
    JDBCPreparedStatement.executeUpdate
    1. org.hsqldb.Constraint.getException(Constraint.java:913)
    2. org.hsqldb.index.IndexAVLMemory.insert(IndexAVLMemory.java:236)
    3. org.hsqldb.persist.RowStoreAVL.indexRow(RowStoreAVL.java:171)
    4. org.hsqldb.TransactionManagerMVCC.addInsertAction(TransactionManagerMVCC.java:402)
    5. org.hsqldb.Session.addInsertAction(Session.java:433)
    6. org.hsqldb.Table.insertSingleRow(Table.java:2500)
    7. org.hsqldb.StatementDML.insertSingleRow(StatementDML.java:820)
    8. org.hsqldb.StatementInsert.getResult(StatementInsert.java:131)
    9. org.hsqldb.StatementDMQL.execute(StatementDMQL.java:190)
    10. org.hsqldb.Session.executeCompiledStatement(Session.java:1300)
    11. org.hsqldb.Session.execute(Session.java:960)
    12. org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStatement.java:4605)
    13. org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(JDBCPreparedStatement.java:308)
    13 frames
  4. c3p0:JDBC DataSources/Resource Pools
    NewProxyPreparedStatement.executeUpdate
    1. com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
    1 frame
  5. net.sf.hibernate
    JDBCTransaction.commit
    1. net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
    2. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
    3. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
    4. net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
    5. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2447)
    6. net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2433)
    7. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2390)
    8. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2259)
    9. net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
    9 frames
  6. Hibernate
    HibernateTransactionManager.doCommit
    1. org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:510)
    1 frame
  7. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
    2. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
    3. org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
    4. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
    4 frames
  8. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  9. Unknown
    $Proxy24.store
    1. $Proxy24.store(Unknown Source)
    1 frame
  10. com.atlassian.confluence
    ConfluenceCachingBandanaPersister.store
    1. com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.store(ConfluenceCachingBandanaPersister.java:130)
    1 frame
  11. com.atlassian.bandana
    DefaultBandanaManager.setValue
    1. com.atlassian.bandana.DefaultBandanaManager.setValue(DefaultBandanaManager.java:48)
    1 frame
  12. com.atlassian.confluence
    ManagedTask.run
    1. com.atlassian.confluence.content.render.xhtml.migration.macro.MacroMigrationService.setMigrationRequired(MacroMigrationService.java:201)
    2. com.atlassian.confluence.content.render.xhtml.migration.macro.RemigrationLongRunningTask.runInternal(RemigrationLongRunningTask.java:79)
    3. com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21)
    4. com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)
    4 frames
  13. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    3. java.util.concurrent.FutureTask.run(FutureTask.java:138)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    6. java.lang.Thread.run(Thread.java:662)
    6 frames