Upgrade to Confluence 6 or above fails when using the embedded database
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
When upgrading to Confluence 6+ from a version of Confluence that uses the HSQL database (5.7 or below), the upgrade fails.
atlassian-confluence.log
に次のメッセージが出力される。
2017-06-12 11:36:27,547 WARN [localhost-startStop-1] [jdbc.env.internal.JdbcEnvironmentInitiator] initiateService HHH000342: Could not obtain connection to query metadata : Unable to resolve name [com.atlassian.hibernate.dialect.HSQL2Dialect] as strategy [org.hibernate.dialect.Dialect]
診断
Starting in Confluence 5.8, the application uses H2 for the embedded database, a newer version of HSQL. Confluence 6 is not compatible with the previous version of this database, so the upgrade tasks fail to run on the database.
回避策
You can force Confluence to use the H2 dialect and try to connect to the database:
- Confluence をシャットダウンします。
- Edit your /confluence_home/confluence.cfg.xml file
Change the following:
<property name="hibernate.dialect">com.atlassian.hibernate.dialect.HSQL2Dialect</property>
to
<property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
- Run the upgrade again
ソリューション
To fully resolve this, you should be running Confluence on an external database. Embedded databases are only supported for trial versions. For live/production environments, please first follow our guide on migrating to an external database, and then run the upgrade.