A consistent Java error
Asked by Joel Brotman:

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) 06-Feb-2020 11:23:46.958 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server\] failed to set property \[debug\] to \[0\]  
06-Feb-2020 11:23:47.519 WARNING \[main\] org.apache.catalina.startup.SetAllPropertiesRule.begin \[SetAllPropertiesRule\]{Server/Service/Connector} Setting property 'debug' to '0' did not find a matching property.  
06-Feb-2020 11:23:47.690 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server/Service/Engine\] failed to set property \[debug\] to \[0\]  
06-Feb-2020 11:23:47.753 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server/Service/Engine/Host\] failed to set property \[debug\] to \[0\]  
06-Feb-2020 11:23:47.940 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server/Service/Engine/Host/Context\] failed to set property \[debug\] to \[0\]  
06-Feb-2020 11:23:48.127 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server/Service/Engine/Host/Context\] failed to set property \[debug\] to \[0\]  
06-Feb-2020 11:23:49.841 INFO \[main\] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler \["http-nio-8090"\]  
06-Feb-2020 11:23:50.200 INFO \[main\] org.apache.catalina.startup.Catalina.load Server initialization in \[4,313\] milliseconds  
06-Feb-2020 11:23:50.246 INFO \[main\] org.apache.catalina.core.StandardService.startInternal Starting service \[Tomcat-Standalone\]  
06-Feb-2020 11:23:50.246 INFO \[main\] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: \[Apache Tomcat/9.0.27\]  
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".  
SLF4J: Defaulting to no-operation (NOP) logger implementation  
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.  
06-Feb-2020 11:24:02.794 INFO \[Catalina-utility-2\] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath  
06-Feb-2020 11:24:03.308 INFO \[Catalina-utility-2\] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.  
06-Feb-2020 11:24:04.243 INFO \[Catalina-utility-2\] org.apache.catalina.core.ApplicationContext.log Initializing Spring DispatcherServlet 'dispatcher'  
2020-02-06 11:24:56,515 INFO \[Catalina-utility-1\] \[com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 7.1.1 \[build 8301 based on commit hash 1f37aa72eaac19bd0bed2ae0e7b3ada09c563331\] - synchrony version 3.1.0-master-0f086db5  
06-Feb-2020 11:25:39.788 INFO \[main\] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler \["http-nio-8090"\]  
06-Feb-2020 11:25:39.897 INFO \[main\] org.apache.catalina.startup.Catalina.start Server startup in \[109,972\] milliseconds


Answers:
author: Hasan Raza
body: Hi Joel, please see: [Fix An Illegal Start Of Expression In Java](https://xperti.io/blogs/fix-illegal-start-of-expression-in-java/), I believe this might help.


author: Shannon S
body: Hello Joel,

Welcome to Atlassian Community. It's nice to meet you.

That error is caused by one of the causes mentioned in the page:

* [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).

While going over the list of causes, please be aware that one of those will be related to the same problem you are encountering. This is even if the exact situation surrounding it doesn't sound exactly the same to you. For example, it could be a general permissions issues, etc.

Please take your time to review that article, and if you have any trouble, just let us know.

Regards,

Shannon

comments: author: m13331108414
body: I have the same question ,but your anwser do not work!


Tags: confluence-server

server