Upgrade to Confluence 6 or above fails when using the embedded database

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

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

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:

  1. Shutdown Confluence
  2. Edit your /confluence_home/confluence.cfg.xml file
  3. Change the following:

    <property name="hibernate.dialect">com.atlassian.hibernate.dialect.HSQL2Dialect</property>

    to

    <property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
  4. 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.

 

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.