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

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

 

症状

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

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"

診断

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:

原因

Server characterset is incorrect.

ソリューション

Shutdown Confuence and change the server collation to utf8

 SET character_set_server = 'utf8';
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.