Confluence fails to start with error message "can't initalise container - corrupt project.cfg.xml"

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

Summary

Confluence fails to start and we see the following error messages in atlassian-confluence.log

1 2 3 4 2021-06-11 03:05:23,073 INFO [Catalina-utility-1] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 7.4.7 [build 8402 based on commit hash 6b68a70068820413941dbe78233b871f8d3c0c6e] - synchrony version 3.1.0-release-confluence_7.4-1af8f87b 2021-06-11 03:05:28,118 ERROR [Catalina-utility-1] [atlassian.config.bootstrap.BootstrappedContextLoaderListener] canInitialiseContainer Hibernate not yet set up, but setup is complete - can't initalise container - corrupt project.cfg.xml? . 2021-06-11 01:03:00,576 FATAL [https-jsse-nio-443-exec-24] [atlassian.spring.container.SpringContainerContext] getComponent Spring Application context has not been set

Environment

It can happen in any version of Confluence with any database.

Diagnosis

  1. Check if <confluence-home>/confluence.cfg.xml contains a line for the hibernate.setup property and it is set to true.

  2. Check if anything has been manually updated in <confluence-home>/confluence.cfg.xml file. Any corruption in this file will stop Confluence from starting up and cause this error.

Solution

  1. If <confluence-home>/confluence.cfg.xml does not contain a line for the hibernate.setup property or it is currently set to false, try to have the line below added/changed and restart Confluence. We have seen cases where this line was missing on the file and adding enabled to instance to start without issues.

      • Edit confluence.cfg.xml file and find the hibernate.dialect property, as below:

        1 2 3 4 ... <property name="hibernate.connection.username">Sanitized by Support Utility <property name="hibernate.dialect">com.atlassian.confluence.impl.hibernate.dialect.PostgreSQLDialect</property> ...
      • Add the line <property name="hibernate.setup">true</property>' right below the hibernate.dialect property, as below:

        1 2 3 4 5 ... <property name="hibernate.connection.username">Sanitized by Support Utility <property name="hibernate.dialect">com.atlassian.confluence.impl.hibernate.dialect.PostgreSQLDialect</property> <property name="hibernate.setup">true</property> ...
  2. If the change above does not enable Confluence to start successfully and it shows the same error on logs, revert any changes previously done to confluence.cfg.xml file. If changes are unknown, install another instance of Confluence with same database. Then copy over confluence.cfg.xml from that instance and retro fit changes.

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.