Could not save the build results. Data too long for column

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When Bamboo is starting, it fails to write to the Database and throws the error message below in atlassian-bamboo.log:

Could not save the build results. Data could be in an inconsistent state.
(org.springframework.jdbc.UncategorizedSQLException : Hibernate operation: could not insert: com.atlassian.bamboo.commit.CommitImpl#18513988; uncategorized SQLException for SQL []; SQL state [01004]; error code [0]; Data truncation: Data too long for column 'COMMIT_COMMENT_CLOB' at row 1;
nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'COMMIT_COMMENT_CLOB' at row 1)

Cause

The database is likely using Non-UTF-8 character encoding. To check the Character set and collation for the database, run the following query on the database:

SELECT default_character_set_name, default_collation_name FROM information_schema.SCHEMATA 
WHERE schema_name = "<database-name>";

For character set, we expect "utf8" and for collation "utf8_bin".

Resolution

Recreate Database with UTF8 encoding as explained in the MySQL installation documentation.


Last modified on Dec 2, 2020

Was this helpful?

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