Upgrade to Confluence 6 or above fails when using the embedded database
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
Problem
When upgrading to Confluence 6+ from a version of Confluence that uses the HSQL database (5.7 or below), the upgrade fails.
The following appears in the atlassian-confluence.log
1
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]
Diagnosis
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.
Workaround
You can force Confluence to use the H2 dialect and try to connect to the database:
Shutdown Confluence
Edit your /confluence_home/confluence.cfg.xml file
Change the following:
1
<property name="hibernate.dialect">com.atlassian.hibernate.dialect.HSQL2Dialect</property>
to
1
<property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
Run the upgrade again
Resolution
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.
Was this helpful?