-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
8.1.1
-
None
-
1
-
Severity 3 - Minor
-
0
-
Issue Summary
When performing a Specs publish or scan, the process will fail and in the logs we will see a constraint violation
Steps to Reproduce
- Perform a normal publishing of Specs
Expected Results
Specs published successful
Actual Results
The publishing will fail. In the logs we will see
2021-10-21 11:46:08,307 INFO [http-nio-8086-exec-22 url: /bamboo2/rest/api/latest/import/plan; user: user] [AbstractBatchImpl] HHH000010: On release of batch it still contained JDBC statements 2021-10-21 11:46:08,307 ERROR [http-nio-8086-exec-22 url: /bamboo2/rest/api/latest/import/plan; user: user] [BatchingBatch] HHH000315: Exception executing batch [java.sql.BatchUpdateException: ORA-00001: unique constraint (BAMBOODB.SYS_C0024117) violated ], SQL: insert into NOTIFICATION_SETS (SET_TYPE, NOTIFICATION_SET_ID) values (?, ?) 2021-10-21 11:46:08,308 WARN [http-nio-8086-exec-22 url: /bamboo2/rest/api/latest/import/plan; user: user] [SqlExceptionHelper] SQL Error: 1, SQLState: 23000 2021-10-21 11:46:08,308 ERROR [http-nio-8086-exec-22 url: /bamboo2/rest/api/latest/import/plan; user: user] [SqlExceptionHelper] ORA-00001: unique constraint (BAMBOODB.SYS_C0024117) violated 2021-10-21 11:46:08,330 ERROR [http-nio-8086-exec-22 url: /bamboo2/rest/api/latest/import/plan; user: user] [BambooPlanConfigImportResource] Unexpected exception while importing plan: org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into NOTIFICATION_SETS (SET_TYPE, NOTIFICATION_SET_ID) values (?, ?)]; constraint [BAMBOODB.SYS_C0024117]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:245) at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:388) at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.bamboo.plan.PlanHibernateDao.getPlanByKey(PlanHibernateDao.java:82) at sun.reflect.GeneratedMethodAccessor1606.invoke(Unknown Source) (...) Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch (...) at com.atlassian.bamboo.plan.PlanHibernateDao$1.doInHibernate(PlanHibernateDao.java:93) at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:385) ... 313 more Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (BAMBOODB.SYS_C0024117) violated at oracle.jdbc.driver.OraclePreparedStatement.executeLargeBatch(OraclePreparedStatement.java:10032) at oracle.jdbc.driver.T4CPreparedStatement.executeLargeBatch(T4CPreparedStatement.java:1364) at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9839) at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:234) at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:121) ... 332 more 2021-10-21 11:46:08,333 WARN [http-nio-8086-exec-22 url: /bamboo2/rest/api/latest/import/plan; user: user] [BambooRuntimeExceptionMapper] Unexpected error from REST call org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into NOTIFICATION_SETS (SET_TYPE, NOTIFICATION_SET_ID) values (?, ?)]; constraint [BAMBOODB.SYS_C0024117]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:245) at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:388) at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.bamboo.plan.PlanHibernateDao.getPlanByKey(PlanHibernateDao.java:82) (...)
Workaround
If this problem happens, we recommend you to wait for some time, since most probably a different Bamboo process needs to finish first.
[BAM-21577] Bamboo Specs publishing fails with a unique constraint violation
UIS | Original: 1 | New: 0 |
UIS | Original: 0 | New: 1 |
UIS | Original: 1 | New: 0 |
UIS | New: 1 |
Support reference count | New: 1 |
Status | Original: Needs Triage [ 10030 ] | New: Gathering Impact [ 12072 ] |