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