Bamboo upgrade fails due to markedForDeletion column being null

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

You get the following error when upgrading Bamboo from 2.6.x or below:

jvm 1 | 2012-03-27 11:44:47,057 FATAL [WrapperSimpleAppMain] [UpgradeLauncher] Failed to initialise Bamboo container
jvm 1 | org.springframework.orm.hibernate.HibernateSystemException: Null value was assigned to a property of primitive type setter of com.atlassian.bamboo.project.DefaultProject.markedForDeletion; nested exception is net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.atlassian.bamboo.project.DefaultProject.markedForDeletion
jvm 1 | Caused by: net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.atlassian.bamboo.project.DefaultProject.markedForDeletion
jvm 1 | at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:57)
jvm 1 | at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:229)
jvm 1 | at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2222)
jvm 1 | at net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:319)
jvm 1 | at net.sf.hibernate.loader.Loader.doQuery(Loader.java:309)
jvm 1 | at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)

Cause

The markedForDeleting column in the database is null, when it should have a boolean value of 0 or 1

Resolution

Try the SQL shown below, to investigate if you have null columns;

SELECT count(*) FROM PROJECT where MARKED_FOR_DELETION is null;

If you do have columns that contain null values, then try the following steps shown below:

  • Shut down the the Bamboo
  • Make a backup of your Bamboo Database
  • In the Bamboo version the production database use the following query:
UPDATE PROJECT set MARKED_FOR_DELETION=0 WHERE MARKED_FOR_DELETION is null;
  • Restart the instance.
Last modified on Jul 10, 2013

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.