Confluence- java.lang.IllegalStateException: Spring Application context has not been set

sahanajsj February 19, 2019

Here is a concern and seeking for support on Confluence Setup.

Actually having a confluence setup which was working fine earlier with lot of data, and later stopped working with the below error.


Encountered the below error and able to understand what would be the cause of this error (Permission Issues) 
As per my knowledge and research based, i tried some workarounds on the server by changing permissions of  sub-folders, home-directory and install-folder and other resolution as mentioned in this link - https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html


Example: $ sudo chown -R confluence.confluence <confluence-install-folder>
$ sudo chown -R confluence.confluence <confluence-home-folder>
$ chmod -R u=rwx,go-rwx <confluence-install-folder>
$ chmod -R u=rwx,go-rwx <confluence-home-folder>

And Delete the <confluence-home>/confluence.cfg.xml file  and start confluence.

Error Encountered Initially:

HTTP Status 500 - java.lang.IllegalStateException: Spring Application context has not been set

 

After kind of troubleshooting with Permission issues. 

1. Confluence has started and landing on the below page(setupstart.action),  should need to complete the installation steps and configure the database schema inorder to retain my earlier confluence setup?

2. Install new Confluence and configure to connect to the existing Database, so that i can retain all my data, files, notes etc without any loss.

 

Which is the best way to retrieve Confluence GUI and Data hosted in Database. Please suggest

 

1 answer

0 votes
Zak Laughton
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2019

Hi Sahana,

The confluence.cfg.xml contains the base configuration for Confluence. If Confluence starts up without this file, it will assume it's a new installation, and will start from the initial setup, which will only prompt you to overwrite the data in the database.

Since you have data you do not want to overwrite, but have deleted confluence.cfg.xml, I see 3 possible options for recovery here (ordered from easiest/preferred to least preferred):

  • Stop Confluence, restore the original confluence.cfg.xml, restart Confluence.
  • If you don't have the original confluence.cfg.xml, you can create a separate new installation on a clean database to configure the confluence.cfg.xml, which you can then copy to your existing instance (you'll also want to change the database connection UR in the file, if necessary).
  • If your instance has been creating automated XML backups (which would be located in <confluence-home>/backup), you can install a new instance and restore these backups.

 

I hope this helps!
– Zak

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events