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

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

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

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:

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.


Last modified on Aug 26, 2019

Was this helpful?

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