Wrong MySQL collation causes build to fail
Symptoms
Bamboo build fails with the following error:
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.
Last modified on Nov 2, 2018
Powered by Confluence and Scroll Viewport.