Upgrade to Bamboo 2.6 Fails on PostgreSQL Server due to Error 'Zero bytes may not occur in string parameters'

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

While upgrading to Bamboo 2.6, the upgrade fails with the following error:

1 2 3 4 2010-06-12 16:03:41,307 WARN [UpgradeTask:pool-4-thread-5|UpgradeTask:pool-4-thread-5] [NewPooledConnection] [c3p0] Another error has occurred \[ org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block ] which will not be reported to listeners! org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)

Cause

As part of the performance improvements in Bamboo 2.6, test result data is stored differently. In versions of Bamboo prior to (and excluding) 2.6, all test result data has been stored in XML files on the filesystem. From Bamboo 2.6, some of this test result data is stored in the database, permitting quicker retrieval of this information.

The error occurs while migrating test results to the database; one or more of buildresults<nn>.xml files may have '\0' character in them, which PostgreSQL cannot handle.

Resolution

To find out which files contain the zero byte character execute the following search query:

1 for file in $(find . -name 'build*.xml') ; do cat -v $file | grep "&#x0;" && echo $file matches; done

Edit the files and remove &#x0; characters from your XML files and run the Bamboo upgrade(s) again.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.