Wrong MySQL collation causes build 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
Bamboo build fails with the following error:
1
2
3
4
5
6
7
8
9
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1366]; Incorrect string value: '\xE2\x88\x91\x0A\x0At...' for column 'COMMIT_COMMENT_CLOB' at row 1; nested exception is java.sql.BatchUpdateException: Incorrect string value: '\xE2\x88\x91\x0A\x0At...' for column 'COMMIT_COMMENT_CLOB' at row 1
Caused by: java.sql.BatchUpdateException: Incorrect string value: '\xE2\x88\x91\x0A\x0At...' for column 'COMMIT_COMMENT_CLOB' at row 1
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2007)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1443)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2436)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2390)
Cause
The MySQL collation and / or character encoding is incorrect.
Resolution
According to our documentation, please make sure that the database is using character set utf8 and collation utf8_bin.
Was this helpful?