LifecycleProcessor not initialized__java

來源:互聯網
上載者:User
[11-15 11:34:43][localhost-startStop-1][INFO ][AbstractApplicationContext.java-1042]-Closing Root WebApplicationContext: startup date [Tue Nov 15 11:34:41 CST 2016]; root of context hierarchy[11-15 11:34:44][localhost-startStop-1][WARN ][AbstractApplicationContext.java-1052]-Exception thrown from ApplicationListener handling ContextClosedEventjava.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 hierarchyat 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 closejava.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 hierarchyat 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的refresh()方法相關異常這篇文章寫的很詳細

2.解決問題的思路,Spring Tomcat issue,問題有可能出現在jar包


我的基本環境:

eclipse,tomcat8.0和tomcat8.5,項目的JDK是1.6


解決辦法:

1.首先確認工程中spring的jar包是否引好了;

2.clean工程和tomcat(可以百度到不少說clean一下tomcat的,但是只是clean的話基本是沒用的)確認不是原來發布過的工程影響;

3.檢查tomcat的JDK版本和工程的JDK版本是否一致(我的就是這個原因,項目是1.6的,tomcat用的1.8的),修改tomcat的JDK版本後clean。


總結:很有可能是spring版本不支援jdk的版本

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.