java.lang.IllegalStateException: ApplicationEventMulticaster not initialized
程序员文章站
2022-07-12 16:56:35
...
[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)
解决办法:
1.首先确认工程中spring的jar包是否引好了;
2.clean工程和tomcat(可以百度到不少说clean一下tomcat的,但是只是clean的话基本是没用的)确认不是原来发布过的工程影响;
3.检查tomcat的JDK版本和工程的JDK版本是否一致(我的就是这个原因,项目是1.7的,tomcat用的1.8的),修改tomcat的JDK版本后clean。
上一篇: EJB Pre之一----------RMI工作原理
下一篇: 对Ext editGrid的尝试
推荐阅读
-
Android8.0 java.lang.IllegalStateException: Not allowed to start service Intent app is in background
-
android Java.lang.IllegalStateException: No activity 把自己坑了
-
java.lang.IllegalStateException: No such application config! Please add dubbo:application name
-
严重: Exception sending context initialized...org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from class p
-
调用方法[manageApp]时发生异常 java.lang.IllegalStateException: 启动子级时出错
-
java.lang.IllegalStateException: Cannot call sendError() after the response has been committed解读
-
java.lang.IllegalStateException: The request associated with the AsyncContext ha
-
java.lang.IllegalStateException: No typehandler found for property params
-
mybatis 异常处理Cause: java.lang.IllegalStateException: Cannot enable lazy loading because CGLIB is not
-
java.lang.IllegalStateException:No typehandler found for property