Artifacts with undefined size caused Bamboo export to fail

Still need help?

The Atlassian Community is here for you.

Ask the community

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:

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:

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.

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;
Last modified on Nov 11, 2013

Was this helpful?

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