Issue Summary
When running MSSQL database and upgrading to Bamboo 7.2.0, Bamboo start up fails and the following error is shown on the UI
Task for build 70202 failed with exception: Null value was assigned to a property [class com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound] of primitive type setter of com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property [class com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound] of primitive type setter of com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound
Steps to Reproduce
- Run MSSQL as your database type for Bamboo
- Upgrade to Bamboo 7.2.0
- Start Bamboo
Expected Results
Bamboo would start up successfully after upgrading
Actual Results
Bamboo start up fails and the the below exception is thrown in the atlassian-bamboo.log file. Note, that the below stack trace has been truncated to show the most relevant parts.
2020-11-24 12:53:26,842 ERROR [18-UpgradeTaskBackgroundThread:pool-39-thread-1] [AbstractUpgradeManager] org.springframework.orm.hibernate5.HibernateSystemException: Null value was assigned to a property [class com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound] of primitive type setter of com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property [class com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound] of primitive type setter of com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound org.springframework.orm.hibernate5.HibernateSystemException: Null value was assigned to a property [class com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound] of primitive type setter of com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property [class com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound] of primitive type setter of com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:300) ... Caused by: org.hibernate.PropertyAccessException: Null value was assigned to a property [class com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound] of primitive type setter of com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound at org.hibernate.property.access.spi.SetterFieldImpl.set(SetterFieldImpl.java:58) ... Caused by: java.lang.IllegalArgumentException: Can not set boolean field com.atlassian.bamboo.plan.VcsLocationBambooSpecsStateImpl.specsNotFound to null value at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) at sun.reflect.UnsafeBooleanFieldAccessorImpl.set(UnsafeBooleanFieldAccessorImpl.java:80) at java.lang.reflect.Field.set(Field.java:764) at org.hibernate.property.access.spi.SetterFieldImpl.set(SetterFieldImpl.java:52) ... 64 more
Workaround
- Stop Bamboo
- Make sure to create a back up of your existing Bamboo database
- Connect to your Bamboo database and run the below query:
UPDATE VCS_SPECS_STATE set SPECS_NOT_FOUND = 0 where SPECS_NOT_FOUND is null
- Start Bamboo