Spring Application context has not been set on a running installation
Asked by Lars van der Lee:

Hi,

We have been running Confluence for around three years now. However last night it went down with the following error message:

HTTP Status 500 - java.lang.IllegalStateException: Spring Application context has not been set {#toc-hId--1440412517}
---------------------------------------------------------------------------------------------------------------------

I have been trying to fix this issue all day, but am unable to get it running. All user permissions are set correctly, and it was running fine until yesterday.

I have been to this page: <https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html>

but not been able to solve the problem. It seems to be mostly occuring to new installations of confluence, and I really cannot lose the data I have on my current installation through a reinstallation.

Does anyone have any suggestions that could solve the issue?

confluence.cfg.xml:

\<?xml version="1.0" encoding="UTF-8"?\>

\<confluence-configuration\>  
\<setupStep\>complete\</setupStep\>  
\<setupType\>custom\</setupType\>  
\<buildNumber\>7400\</buildNumber\>  
\<properties\>  
\<property name="admin.ui.allow.daily.backup.custom.location"\>false\</property\>  
\<property name="admin.ui.allow.manual.backup.download"\>false\</property\>  
\<property name="admin.ui.allow.site.support.email"\>false\</property\>  
\<property name="atlassian.license.message"\>XXXX\</property\>  
\<property name="attachments.dir"\>${confluenceHome}/attachments\</property\>  
\<property name="confluence.setup.server.id"\>XXXX\</property\>  
\<property name="confluence.webapp.context.path"\>\</property\>  
\<property name="hibernate.c3p0.acquire_increment"\>1\</property\>  
\<property name="hibernate.c3p0.idle_test_period"\>100\</property\>  
\<property name="hibernate.c3p0.max_size"\>60\</property\>  
\<property name="hibernate.c3p0.max_statements"\>0\</property\>  
\<property name="hibernate.c3p0.min_size"\>20\</property\>  
\<property name="hibernate.c3p0.timeout"\>30\</property\>  
\<property name="hibernate.connection.driver_class"\>org.postgresql.Driver\</property\>  
\<property name="hibernate.connection.isolation"\>2\</property\>  
\<property name="hibernate.connection.password"\>XXXX\</property\>  
\<property name="hibernate.connection.url"\>jdbc:postgresql://localhost:5432/confluence\</property\>  
\<property name="hibernate.connection.username"\>admin\</property\>  
\<property name="hibernate.database.lower_non_ascii_supported"\>true\</property\>  
\<property name="hibernate.dialect"\>com.atlassian.confluence.impl.hibernate.dialect.PostgreSQLDialect\</property\>  
\<property name="hibernate.setup"\>true\</property\>  
\<property name="jwt.private.key"\>XXXX\</property\>  
\<property name="jwt.public.key"\>XXXX\</property\>  
\<property name="lucene.index.dir"\>${localHome}/index\</property\>  
\<property name="setup.hasSelectedBundle"\>true\</property\>  
\<property name="synchrony.btf"\>true\</property\>  
\<property name="synchrony.encryption.disabled"\>true\</property\>  
\<property name="synchrony.proxy.enabled"\>true\</property\>  
\<property name="webwork.multipart.saveDir"\>${localHome}/temp\</property\>  
\</properties\>  
\</confluence-configuration\>

With the full stack trace:

**type** Exception report

**message** ++java.lang.IllegalStateException: Spring Application context has not been set++

**description** ++The server encountered an internal error that prevented it from fulfilling this request.++

**exception**

```
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)	com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter.getServletModuleManager(ServletFilterModuleContainerFilter.java:20)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:62)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)	com.atlassian.confluence.internal.web.filter.spring.IgnoreWebAsyncManagerFilter.doFilter(IgnoreWebAsyncManagerFilter.java:59)	com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:51)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:39)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:72)	com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:49)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.doFilter(VCacheRequestContextFilter.java:58)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:33)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:65)	com.atlassian.confluence.web.filter.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:54)	com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:23)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.web.ConfluenceJohnsonFilter.doFilter(ConfluenceJohnsonFilter.java:31)	com.atlassian.confluence.impl.servlet.HoldingUntilStartedFilter.doFilter(HoldingUntilStartedFilter.java:88)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
```

**root cause**

```
java.lang.IllegalStateException: Spring Application context has not been set	com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:48)	com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)	com.atlassian.confluence.util.LazyComponentReference$Accessor.get(LazyComponentReference.java:42)	com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85)	com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)	com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter.getServletModuleManager(ServletFilterModuleContainerFilter.java:20)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:62)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)	com.atlassian.confluence.internal.web.filter.spring.IgnoreWebAsyncManagerFilter.doFilter(IgnoreWebAsyncManagerFilter.java:59)	com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:51)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:39)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:72)	com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:49)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.doFilter(VCacheRequestContextFilter.java:58)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:33)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:65)	com.atlassian.confluence.web.filter.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:54)	com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:23)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.confluence.web.ConfluenceJohnsonFilter.doFilter(ConfluenceJohnsonFilter.java:31)	com.atlassian.confluence.impl.servlet.HoldingUntilStartedFilter.doFilter(HoldingUntilStartedFilter.java:88)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
```


Answers:
author: Orlando Puig
body: Hi,

Were you able to resolve this? I'm having the same problem.

comments: author: Lars van der Lee
body: Yes, I solved my problem. The server had filled all storage capacity, meaning it couldn't write any data to the disc. This problem is related to write access for confluence, so double check that!


Tags: application

confluence-server

context

server

spring