Errors encountered while exporting Bamboo: null.

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Bamboo fails to generate a valid export file through the Bamboo administration >> Overview >> System >> Export page with the following message:

The following appears in the $BAMBOO_HOME/logs/atlassian-bamboo.log file:

2016-07-21 14:11:52,858 INFO [http-apr-8085-exec-5] [XmlMigrator] Writing xml to file: C:\bamboo-home\exports\export_bamboo_51020_20160721.zip\db-export\artifacts.xml
2016-07-21 14:11:52,858 INFO [http-apr-8085-exec-5] [XmlMigrator] Exporting with: com.atlassian.bamboo.artifact.ArtifactMapper
2016-07-21 14:11:52,954 INFO [http-apr-8085-exec-5] [XmlMigrator] Ensuring the the file has been unmounted
2016-07-21 14:11:52,955 INFO [http-apr-8085-exec-5] [XmlMigrator] Unmounted C:\bamboo-home\exports\export_bamboo_51020_20160721.zip
2016-07-21 14:11:52,963 INFO [http-apr-8085-exec-5] [ServerLifecycleManagerImpl] Server state changed to 'RUNNING' from 'PAUSED' by 'bamboouser'
2016-07-21 14:11:52,964 ERROR [http-apr-8085-exec-5] [Export] java.lang.NullPointerException
java.lang.NullPointerException
	at com.atlassian.bamboo.artifact.ArtifactMapper.exportProperties(ArtifactMapper.java:102)
	at com.atlassian.bamboo.artifact.ArtifactMapper.exportProperties(ArtifactMapper.java:21)
    ...

Diagnosis

Diagnostic Steps

  • Check the corrupted export file at $BAMBOO_HOME/exports folder. Unzip the file and look for the db-export/artifacts.xml file. This file should be empty as the export process failed to extract the ARTIFACT table from the database.
  • Run the following SQL statement to find out if you are affected by this issue:

    select *
      from ARTIFACT
     where ARCHIVER_TYPE is NULL;

    If the SQL statement return any results, it means you have the ARCHIVER_TYPE column set to NULL inside the database for those artifacts.

Cause

The ARCHIVER_TYPE column cannot have a NULL value, it accepts only 0 or 1. This column is created in Bamboo 5.10.x and automatically set to 0 by one of the upgrade tasks introduced in Bamboo 5.10.x. If for some reason the upgrade does not complete successfully and the upgrade task 51002 is not run, you could end up with a NULL value in this column.

Resolution

Perform the upgrade process again and ensure all upgrade tasks are run successfully, including the upgrade task number 51002. It is possible to check if the upgrade task was successful from the $BAMBOO_HOME/logs/atlassian-bamboo.log file:

2016-08-15 15:29:56,547 INFO [13-UpgradeTaskBackgroundThread:pool-28-thread-1] [AbstractUpgradeManager] 51002 : Initialize archiver field for artifacts table
2016-08-15 15:29:56,547 INFO [13-UpgradeTaskBackgroundThread:pool-28-thread-1] [AbstractUpgradeManager] -----------------------------------------------------
2016-08-15 15:29:56,568 INFO [13-UpgradeTaskBackgroundThread:pool-28-thread-1] [AbstractUpgradeManager] Completed task 51002 successfully.

If this upgrade task failed or was not executed, it means other upgrade tasks also failed, so it is necessary to perform the upgrade process from scratch.

If by any chance you are unable to upgrade Bamboo again, please raise a support request at support.atlassian.com so our Bamboo support team can help you find another way of fixing this issue. Please do not attempt to update the Bamboo database without contacting Atlassian Support.

 

Last modified on Aug 24, 2016

Was this helpful?

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