Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo build result can't be saved

Kevin Maes August 7, 2014

We have a couple of build plans that run well untill the results are stored into the database.

We get the following error:

System Error Details
Build Swiftcom - swiftcom2 5.7 Release - Default Job 1 : Could not save the build results. Data could be in an inconsistent state. 
(org.springframework.jdbc.UncategorizedSQLException : Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1364]; Field 'LABEL' doesn't have a default value; nested exception is java.sql.BatchUpdateException: Field 'LABEL' doesn't have a default value)
Occurred: 07 Aug 2014, 12:58:55 PM 
Agent: Local Agent 5
________________________________________
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1364]; Field 'LABEL' doesn't have a default value; nested exception is java.sql.BatchUpdateException: Field 'LABEL' doesn't have a default value
Caused by: java.sql.BatchUpdateException: Field 'LABEL' doesn't have a default value
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2055)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2440)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2394)
at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1823)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3654)
at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
at net.sf.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:385)
at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao$32.doInHibernate(BuildResultsSummaryHibernateDao.java:1272)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337)
at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao.findLastBuildResultBeforeWithTests(BuildResultsSummaryHibernateDao.java:1261)
at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.findLastBuildResultBeforeWithTests(BuildResultsSummaryManagerImpl.java:1322)
at sun.reflect.GeneratedMethodAccessor1806.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy44.findLastBuildResultBeforeWithTests(Unknown Source)
at com.atlassian.bamboo.resultsummary.tests.TestsManagerImpl.getPreviousResultsSummary(TestsManagerImpl.java:722)
at com.atlassian.bamboo.resultsummary.tests.TestsManagerImpl.copyTestResultsToBuildResultsSummary(TestsManagerImpl.java:348)
at com.atlassian.bamboo.resultsummary.tests.TestsManagerImpl.copyTestResultsToBuildResultsSummary(TestsManagerImpl.java:319)
at sun.reflect.GeneratedMethodAccessor1523.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy82.copyTestResultsToBuildResultsSummary(Unknown Source)
at com.atlassian.bamboo.plan.PlanStatePersisterImpl.saveFinishedBuildResult(PlanStatePersisterImpl.java:109)
at sun.reflect.GeneratedMethodAccessor1521.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.atlassian.bamboo.author.AuthorCreatorServiceInterceptor.invoke(AuthorCreatorServiceInterceptor.java:46)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy84.saveFinishedBuildResult(Unknown Source)
at com.atlassian.bamboo.plan.PlanStatePersisterServiceImpl$1.call(PlanStatePersisterServiceImpl.java:42)
at com.atlassian.bamboo.plan.PlanStatePersisterServiceImpl$1.call(PlanStatePersisterServiceImpl.java:38)
at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312)
at com.atlassian.bamboo.plan.PlanStatePersisterServiceImpl.saveFinishedBuildResult(PlanStatePersisterServiceImpl.java:37)
at com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor.processBuildResult(LocalBuildResultProcessor.java:133)
at com.atlassian.bamboo.v2.build.agent.LocalResultProcessorImpl.processResult(LocalResultProcessorImpl.java:38)
at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.processResult(BuildAgentControllerImpl.java:179)
at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:140)
at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:110)
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: Field 'LABEL' doesn't have a default value
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1086)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2441)
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2007)
... 67 more

So Field 'LABEL' doesn't have a default value. Seems to me we missed something in the latest upgrade. The weird thing is it doesn't happen for the other 20+ build plans that run fine.

We are on version 5.6.0 build 4409

4 answers

1 vote
Edward Hooper August 13, 2014

The table brs_artifact_link has a column LABEL that is NOT NULL and default NULL. I changed the it to a NULL'able column and *that* error message went away, but another one just like it was generated for a column called CHAIN_ARTIFACT in that same table. It is a bit(1) column that is NOT NULL and default NULL. I set the default to b'0' (binary 0) and it completes the task without error.

(There were changes to three two other tables, artifact and artifact_definition that also had a column LABEL that was NOT NULL and default NULL and they were changed but didn't negate the error message.)

I suspect there are a lot of these so tracking them down will be fun.

Edward Hooper August 13, 2014
ALTER TABLE bamboo.brs_artifact_link MODIFY LABEL varchar(255) NULL;
ALTER TABLE bamboo.brs_artifact_link MODIFY CHAIN_ARTIFACT bit(1) DEFAULT b'0';
ALTER TABLE bamboo.artifact MODIFY LABEL varchar(255) NULL;
ALTER TABLE bamboo.artifact_definition MODIFY LABEL varchar(255) NULL;

Kevin Maes August 21, 2014

Thanks for your input.

Changing the database scheme is the obvious solution, but I was hopeing someone could point me out something we missed in the installation or is this a bug.

Edward Hooper August 22, 2014

I believe this is a bug. We had an older version of Bamboo installed that had the columns set this way, but after an upgrade the configuration changed.

0 votes
Kevin Maes August 26, 2014

Now another issue in the same trend pops up

We will probably have to fix it the same way. Altering the database scheme

Caused by: java.sql.SQLException: Field 'CHAIN_ARTIFACT' doesn't have a default value
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1086)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2441)
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2007)
	... 67 more
0 votes
Sander Verschuren August 11, 2014

Hi, I'm investigating this problem together with Kevin.

No, we are not using the automated labels feature.

0 votes
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2014

Are you using the automated labels feature for those builds? Looks like the regexp is matching but not providing data.

https://confluence.atlassian.com/display/BAMBOO/Configuring+automatic+labelling+of+job+build+results

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events