Confluence crashed and got error "Spring Application context has not been set"
Asked by Yingying Wang:

Our Confluence suddenly crashed and then manually start with Fatal error below:

2019-10-31 02:40:18,327 FATAL \[localhost-startStop-4\] \[atlassian.spring.container.SpringContainerContext\] getComponent Spring Application context has not been set  
2019-10-31 02:40:18,330 WARN \[localhost-startStop-4\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextDestroyed Failed to shut down plugin system during ServletContext shutdown: Spring Application context has not been set

Once we tried to open the main page, it redirected us to the setup page.([https://\<our confluence server hostname\>/setup/setupstart.action](https://confluence.gsn.com.au/setup/setupstart.action))

no change has been made recently, and Confluence was working properly before crash. What is the possible reason of this error? how to fix it ?


Answers:
author: Yoga Reddy {Appfire}
body: Hi [@Yingying Wang](/t5/user/viewprofilepage/user-id/3554643)   

Regarding the "**Spring Application context has not been set**" issue, there might be several causes. Please review the following article and identify the root cause of this issue.

[Confluence does not start due to Spring Application context has not been set](https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html?_ga=2.235807553.1986299274.1572526281-1957237503.1563649138)  

Thanks

Yoga

comments: author: Yingying Wang
body: Hi Yoga,

Thanks for your answer. while it is still not fixed.

I noticed that plugindata table in the database is empty, is it normal ?

confluencedb=# select PLUGINDATAID, PLUGINKEY, FILENAME, LASTMODDATE from PLUGINDATA;  
plugindataid \| pluginkey \| filename \| lastmoddate  
--------------+-----------+----------+-------------  
(0 rows)

currently error logs:

2019-11-04 22:39:26,996 FATAL \[localhost-startStop-1\] \[atlassian.spring.container.SpringContainerContext\] getComponent Spring Application context has not been set  
2019-11-04 22:39:26,997 ERROR \[localhost-startStop-1\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextInitialized Error initialising plugin manager: Spring Application context has not been set

Regards,

Ying


author: Yingying Wang
body: Hi Yoga,

I am wondering if my confluence.cfg.xml file has been corrupted. it is not empty, but I didn't find any database connection details there? ( I am using an local postgresql as confluence database)

\<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.h2.Driver\</property\>  
\<property name="hibernate.connection.isolation"\>2\</property\>  
\<property name="hibernate.connection.password"\>\</property\>  
\<property name="hibernate.connection.username"\>sa\</property\>  
\<property name="hibernate.database.lower_non_ascii_supported"\>true\</property\>  
\<property name="hibernate.dialect"\>org.hibernate.dialect.H2Dialect\</property\>  
\<property name="hibernate.setup"\>true\</property\>

Should JDBC driver or Database information be stored in this file ?

Regards,

Ying


Tags: confluence-server

server