Upgrade to Confluence 6 or above fails when using the embedded database
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
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
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:
- Shutdown Confluence
- Edit your /confluence_home/confluence.cfg.xml file
Change the following:
- 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.