Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Confluence configuration Spring Application context has not been set

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.

like image 203
user2507194 Avatar asked Oct 30 '22 23:10

user2507194


1 Answers

In my case the issue was corrupted confluence.cfg.xml file (contains DB connection stings and other settings). The file size 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 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.

like image 139
Pavel Kovalev Avatar answered Nov 15 '22 06:11

Pavel Kovalev