Cannot initialize context because there is already a root application context present

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

Symptoms

Configuring a fresh Bamboo installation fails with following exception:

1 java.lang.IllegalStateException: Cannot initialize context because here is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml

Causes

  1. The database selection is changed half way through the setup process.

  2. If the Next button is clicked twice.

Resolution

The only workaround is to shutdown Bamboo, delete BAMBOO_HOME and start over.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.