org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document

原创 2015年07月07日 13:06:24
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/spring-servlet.xml]
	org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
	org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
	org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
	org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
	org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
	org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
	org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
	org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
	org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
	org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
	javax.servlet.GenericServlet.init(GenericServlet.java:212)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	java.lang.Thread.run(Thread.java:745)

	在spring-servlet中添加<context:component-scan base-package="com.venustech.controller"/> 这样就可以扫描到控制器中的内容了,可是我已经在application-context.xml中加入了<context:component-scan base-package="com.venustech"/>为什么还要在sppring-servlet中加呢?不过我把application-context.xml中删除掉这句时照样跳过去了!看来这句话得加在spring-servlet.xml中了.
	注意了,这里的spring 是对应我web.xml中的设置的spring转换器中的servlet-name.
	等我把spring mvc理解透彻时就把spring data jpa加进去也许那application-context.xml就要改咯!
版权声明:本文为博主原创文章,未经博主允许不得转载。

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document fro

练习spring与struts2 整合时,当部署web项目的时候报如下

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from ...

org.springframework.beans.factory.BeanDefinitionStoreException:

Document root element "beans", must match DOCTYPE root "null" Line 5 in XML document from class p...

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component c

针对org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component...

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 23 in XML document from

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 23 in XML document from ...

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component

严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanDefinitionStoreException: Failed...

spring-org.springframework.beans.factory.BeanDefinitionStoreException及相关介绍

自己做一个测试,要用到Springmvc,因为好久没有配置SpringMvc工程,所以就想自己慢慢试试,真是不试不知道,no zuo no die!!! 启动tomcat后报了下面的错: 严重: E...

org.springframework.beans.factory.BeanDefinitionStoreException异常处理

今天调代码的时候出现了 如下的错误,经过多方查证,发现原来是eclipse版本的问题。异常: 四月 26, 2017 10:54:36 上午 org.apache.catalina.core.Ap...

org.springframework.beans.factory.BeanDefinitionStoreException

1、错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -hel...

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Can

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Ca...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document
举报原因:
原因补充:

(最多只允许输入30个字)