spring配置出错: BeanFactory not initialized or already closed - call 'refresh' before accessing beans vi

错误信息

2015-01-30 10:38:21,119 WARN [org.springframework.web.context.support.XmlWebApplicationContext] - 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 [Fri Jan 30 10:38:20 CST 2015]; root of context hierarchy


 

2015-1-30 10:38:21 org.apache.catalina.core.StandardContext listenerStop
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
	at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
	at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1093)
	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1067)
	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1013)
	at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:559)
	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:115)
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1105)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1664)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	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)

 

错误提示bean无法初始化,我检测上下文配置,找了很久,最后终于找到了错误

password


调用的时候竟然忘记加${}。。。

${password}

 

你可能感兴趣的:(Error,Message,spring)