我正在使用maven_spring 3.1.M2 + hibernate 3.5。有一次,我把線<tx:annotation-driven />
我applicationcontex XML文件中,將出現follwoing錯誤:java.lang.IllegalStateException:LifecycleProcessor未初始化 - 在通過上下文調用生命週期方法之前調用'refresh'
WARNING: 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 [Sat Jul 16 13:00:52 IST 2011]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:350)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1033)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:988)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:534)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4721)
at org.apache.catalina.core.StandardContext$4.call(StandardContext.java:5423)
at org.apache.catalina.core.StandardContext$4.call(StandardContext.java:5402)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
我應該怎麼做來解決這個問題?
請:a)你的背景是什麼樣的? b)你的上下文是如何開始的(編程式,webapp等)? –
你可能會缺少一個類,就像我在這裏:http://stackoverflow.com/q/8330414/。還有其他例外嗎? – Josh