Artifacts with undefined size caused Bamboo export to fail

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Symptoms

When exporting Bamboo backup with only the build results, it works fine but when you select the other options like the "export results" and/or the "export artifacts", it crashed. The following appears in the log files:

1 2 Export has failed. Errors encountered while exporting: Null value was assigned to a property of primitive type setter of com.atlassian.bamboo.build.artifact.DefaultArtifactLink.size; nested exception is net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.atlassian.bamboo.build.artifact.DefaultArtifactLink.size.

Cause

One or more of your builds have artifacts with no size defined. This can also happen if there are wrong linkages between the builds and the artifacts. This caused database corruption. Use the following queries to determine the level:

1 2 3 select * from BRS_CONSUMED_SUBSCRIPTION where artifact_link_id in (select artifact_link_id from BRS_ARTIFACT_LINK where ARTIFACT_SIZE is NULL); select * from BRS_ARTIFACT_LINK where ARTIFACT_SIZE is NULL;

Resolution

If the above returned some entries, run the below queries in that order to fix the issue. You will need to restart the server for the changes to take effect.

1 2 3 delete from BRS_CONSUMED_SUBSCRIPTION where artifact_link_id in (select artifact_link_id from BRS_ARTIFACT_LINK where ARTIFACT_SIZE is NULL); delete from BRS_ARTIFACT_LINK where ARTIFACT_SIZE is NULL;
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.