Upgrading fails with ERROR The size (16777215) given to the column 'event' exceeds the maximum allowed for any data type (8000) in Confluence

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

問題

Customers on Microsoft SQL Server can run into an error where the 'EVENTS' table fails to be created due to the size given to the 'EVENT' column, when upgrading to Confluence 6.0 or later.

The following appears in the confluence.log file:

ERROR [localhost-startStop-1] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create table [EVENTS] ([rev] varchar(255) not null, [history] varchar(255) not null, [partition] int not null, [sequence] int not null, [event] varbinary(16777215) null, primary key ([rev], [history]))
java.sql.SQLException: The size (16777215) given to the column 'event' exceeds the maximum allowed for any data type (8000).

診断

環境

  • Database: Microsoft SQL Server (2012 and 2014)

診断ステップ

  • Prior to upgrading, the <confluence-home>/confluence.cfg.xml file contains the following value for the "hibernate.dialect" property: 

    <property name="hibernate.dialect">net.sf.hibernate.dialect.SQLServerDialect</property>

原因

The "hibernate.dialect" property is incorrectly retained after upgrading.

The net.sf.hibernate.dialect.SQLServerDialect dialect was used in a very old version of Confluence, and has since been deprecated. Instances that have been upgraded from Confluence 2.4 or earlier have retained this deprecated dialect due to a bug in the upgrade process, which has caused a problem for customers upgrading to Confluence 6.0 or later.  

回避策

To manually work around this issue, before upgrading to Confluence 6.0 or later, edit <confluence-home>/confluence.cfg.xml, and change this property:

<property name="hibernate.dialect">net.sf.hibernate.dialect.SQLServerDialect</property>

to the following:

<property name="hibernate.dialect">net.sf.hibernate.dialect.SQLServerIntlDialect</property>
最終更新日 2017 年 4 月 19 日

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

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