Reputation: 185
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.
Upvotes: 6
Views: 8737
Reputation: 8156
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.
Upvotes: 3
Reputation: 141
Atlassian documentation lists the following causes of this problem:
<install>/confluence/WEB-INF/classes/confluence-init.properties
or the install directory.root
user or if you have an application firewall enabled (SeLinux or AppArmor).<install>/confluence/WEB-INF/lib
folder or you are using a database version that is incompatible with the bundled driver. In my case I was running it as root user inside docker container.
Upvotes: 1