java.lang.IllegalStateException: ApplicationEventMulticaster not initialized

[11-15 11:34:44][localhost-startStop-1][WARN ][AbstractApplicationContext.java-1052]-Exception thrown from ApplicationListener handling ContextClosedEvent  
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Tue Nov 15 11:34:41 CST 2016]; root of context hierarchy  
    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:347)  
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)  
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)  
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)  
    at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:558)  
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)  
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4774)  
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5411)  
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)  
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)  
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1404)  
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1394)  
    at java.util.concurrent.FutureTask.run(Unknown Source)  
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
    at java.lang.Thread.run(Unknown Source)  
[11-15 11:34:44][localhost-startStop-1][WARN ][AbstractApplicationContext.java-1060]-Exception thrown from LifecycleProcessor on context close  
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Tue Nov 15 11:34:41 CST 2016]; root of context hierarchy  
    at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)  
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057)  
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)  
    at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:558)  
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)  
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4774)  
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5411)  
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)  
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)  
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1404)  
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1394)  
    at java.util.concurrent.FutureTask.run(Unknown Source)  
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
    at java.lang.Thread.run(Unknown Source)  

 Solution:
1. First, confirm whether the spring jar package in the project has been imported;
2. Clean the project and tomcat (you can say to clean tomcat from Baidu, but it is basically useless if it is only clean) Confirm that it is not the original release
3. Check whether the JDK version of tomcat is consistent with the JDK version of the project (mine is the reason, the project is 1.7, the tomcat uses 1.8), and clean after modifying the JDK version of tomcat .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326125669&siteId=291194637