已有51人关注
spring在夫妻加载找不到配置文件
发表在JavaWeb答疑区 2017-06-01
是否精华
版块置顶:

2345截图20170601124822.png

: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:344)

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)

at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)

at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)

at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)

at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)

at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)

at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)

at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:609)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:510)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]

at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:141)

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:330)

... 21 more


六月 01, 2017 12:44:32 下午 org.apache.catalina.core.StandardContext startInternal

严重: Error listenerStart

六月 01, 2017 12:44:32 下午 org.apache.catalina.core.StandardContext startInternal

严重: Context [/spring_demo] startup failed due to previous errors

六月 01, 2017 12:44:32 下午 org.apache.catalina.core.ApplicationContext log

信息: Closing Spring root WebApplicationContext

六月 01, 2017 12:44:32 下午 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:170)

at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1006)

at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:982)

at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:934)

at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:583)

at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:116)

at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5014)

at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5659)

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$StartChild.call(ContainerBase.java:1559)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)


分享到:
精彩评论 11
18246196132
学分:49 LV2
2017-06-05
11L

silence雪 发表于2017-06-05 13:43

好吧,如果感兴趣还是彻底的去研究一下之前的错误原因。

这才是一个程序员成长的过程,而不是说会敲多少行的代码。

嗯嗯

首页上一页 12 下一页尾页 11 条记录 2/2页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照