Confluence configuration Spring Application context has not been set
Asked Answered
R

2

6

I tried to install confluence on my own ubuntu server, but always failed. The error is:

com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

caused by: java.lang.IllegalStateException: Spring Application context has not been set
at com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:48)

I saw some solutions in the jira confluence forum saying try to fix the permission of installed directory and home directory. I tried but failed again. How can I fix the problem.

Riess answered 19/7, 2016 at 2:9 Comment(0)
I
3

In my case the issue was corrupted confluence.cfg.xml file (contains DB connection stings and other settings). The file size was 0 bytes.

I would suggest to use a VM to create a new installation and borrow confluence.cfg.xml from that installation.

It's embarrassing that this behavior has been allowed to exist for nearly 7 years in a commercial product. This is a basic stuff...

I wish that was on instructions somewhere: Make single backup copy of confluence.cfg.xml immediately before any writes to it by the application. Application should be able to restore from backed up copy if it gets corrupted.

Insincerity answered 30/10, 2016 at 19:12 Comment(1)
10 years. It's still a bug.Multicolored
G
1

Atlassian documentation lists the following causes of this problem:

  1. The user running Confluence does not have write permissions to the home folder defined in <install>/confluence/WEB-INF/classes/confluence-init.properties or the install directory.
  2. You are running Confluence as the root user or if you have an application firewall enabled (SeLinux or AppArmor).
  3. The database driver is not located in the <install>/confluence/WEB-INF/lib folder or you are using a database version that is incompatible with the bundled driver.
  4. The hostname of the server can not be resolved.

In my case I was running it as root user inside docker container.

Ghastly answered 27/9, 2016 at 15:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.