"Name is null" error after restoring Bamboo from backup
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
After restoring Bamboo from a backup or database dump, Bamboo will fail to start and the following appears in the atlassian-bamboo
.log
2016-11-28 13:48:43,199 ERROR [http-nio-80-exec-13] [FiveOhOh] 500 Exception was thrown.
io.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException: Name is null
...
Caused by: java.lang.NullPointerException: Name is null
at java.lang.Enum.valueOf(Enum.java:236)
at com.atlassian.bamboo.plugins.bitbucket.BitbucketAccessLevel.valueOf(BitbucketAccessLevel.java:11)
at com.atlassian.bamboo.plugins.bitbucket.BitbucketRepository.populateFromConfig(BitbucketRepository.java:309)
at com.atlassian.bamboo.vcs.configuration.legacy.configurator.LegacyBranchConfigurator.getVcsBranchFromRepositoryXml(LegacyBranchConfigurator.java:88)
at com.atlassian.bamboo.vcs.configuration.service.RawRepositoryConfigurationXmlConverterImpl.fromEntity(RawRepositoryConfigurationXmlConverterImpl.java:104)
at com.atlassian.bamboo.repository.RepositoryDefinitionManagerImpl.entityToUnmergedData(RepositoryDefinitionManagerImpl.java:151)
...
Cause
This is caused by the database coming from an older version of Bamboo than the home directory and especially the value shown in <bamboo-home>/bamboo.cfg.xml
.
Often, this happens if Bamboo is started up and the Upgrade Tasks run before the database is restored. This applies to Bamboo installations using Bitbucket Cloud repositories.
Resolution
If you have a back up of your <bamboo-home>
directory and Bamboo database, please:
- Shutdown Bamboo
Restore
<bamboo-home>
from the backupRestore the database from backup
- Start Bamboo to run the Upgrade again