Unable to upgrade Confluence. Data too long for column 'MINOR_EDIT'

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

Summary

Symptoms

An upgrade from Confluence 4.x to 5.x fails. The following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ERROR [localhost-startStop-1] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.MinorEditAttachmentsUpgradeTask@74680bee failed during the SCHEMA_UPGRADE phase due to: PreparedStatementCallback; SQL [UPDATE ATTACHMENTS SET MINOR_EDIT = ?]; null, message from server: "Data too long for column 'MINOR_EDIT' at row 1"; nested exception is java.sql.SQLException: null, message from server: "Data too long for column 'MINOR_EDIT' at row 1" com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.MinorEditAttachmentsUpgradeTask@74680bee failed during the SCHEMA_UPGRADE phase due to: PreparedStatementCallback; SQL [UPDATE ATTACHMENTS SET MINOR_EDIT = ?]; null, message from server: "Data too long for column 'MINOR_EDIT' at row 1"; nested exception is java.sql.SQLException: null, message from server: "Data too long for column 'MINOR_EDIT' at row 1" at com.atlassian.confluence.upgrade.AbstractUpgradeManager.executeUpgradeStep(AbstractUpgradeManager.java:273) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.runSchemaUpgradeTasks(AbstractUpgradeManager.java:217) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:169) at com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener.contextInitialized(UpgradeLauncherServletContextListener.java:51) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [UPDATE ATTACHMENTS SET MINOR_EDIT = ?]; null, message from server: "Data too long for column 'MINOR_EDIT' at row 1"; nested exception is java.sql.SQLException: null, message from server: "Data too long for column 'MINOR_EDIT' at row 1"

Diagnosis

MySQL server is the database and the collation is not utf8. Run the status command at the MySQL prompt to show the characterset as shown below:

(Auto-migrated image: description temporarily unavailable)

Cause

Server characterset is incorrect.

Solution

Resolution

Shutdown Confuence and change the server collation to utf8

1  SET character_set_server = 'utf8';
Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.