Details
-
Bug
-
Resolution: Invalid
-
Low
-
None
-
5.10.3
Description
Summary
Bamboo throws the following error while attempting to export data out of Bamboo:
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)
Steps to Reproduce
- Go to Bamboo administration >> Overview >> System >> Export.
- Click on the Export button.
- Wait for the export process to finish.
Expected Results
The export process writes to the artifacts.xml file successfully:
2016-07-28 17:29:42,625 INFO [http-nio-8085-exec-9] [XmlMigrator] Writing xml to file: /Users/brosa/Documents/Atlassian/restore/sqlserver/bamboo-5.10.3/home/exports/export_restore5103_51020_20160728.zip/db-export/artifacts.xml 2016-07-28 17:29:42,625 INFO [http-nio-8085-exec-9] [XmlMigrator] Exporting with: com.atlassian.bamboo.artifact.ArtifactMapper 2016-07-28 17:29:42,716 INFO [http-nio-8085-exec-9] [XmlMigrator] Finished writing to file: /Users/brosa/Documents/Atlassian/restore/sqlserver/bamboo-5.10.3/home/exports/export_restore5103_51020_20160728.zip/db-export/artifacts.xml ...
And reports:
... 2016-07-28 17:30:10,983 INFO [http-nio-8085-exec-9] [XmlMigrator] Finished updating zip 2016-07-28 17:30:10,983 INFO [http-nio-8085-exec-9] [XmlMigrator] Ensuring the the file has been unmounted 2016-07-28 17:30:10,984 INFO [http-nio-8085-exec-9] [XmlMigrator] Unmounted /Users/brosa/Documents/Atlassian/restore/sqlserver/bamboo-5.10.3/home/exports/export_restore5103_51020_20160728.zip 2016-07-28 17:30:10,984 INFO [http-nio-8085-exec-9] [XmlMigrator] Export completed. 00:02:55.010
No error messages in the logs.
Actual Results
The export process fails while trying to export and write the artifacts.xml file with:
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)
Workaround
The problem is caused by the null value assigned to the ARCHIVER_TYPE column inside the ARTIFACT table. This column does not accept null values.
It is possible to identify the problem with the following SELECT statement:
Checking if you are affected by this bug
select *
from ARTIFACT
where ARCHIVER_TYPE is null;
If the above search return null values, you can change them to 0 using the following steps:
- Stop Bamboo.
- Take a backup of the Bamboo database before moving forward.
- Run the following SQL query:
Updating null values to 0
update ARTIFACT set ARCHIVER_TYPE = 0 where ARCHIVER_TYPE is null;
- Start Bamboo.