spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
2017-02-07 17:15
441 查看
Tomcat容器启动失败,找到 debug日志一看:
Context initialization failed
org.springframework. beans.factory.xml.XmlBeanDefinitionStoreException:Line 1 in XML document from file [spring-wlf.xml] is invalid;nested exception is org.xml.sax.SAXParseException:The processing instruction target matching "[xX][mM][1L]” is not allowed.
回头打开spring-wlf.xml仔细看了下
<?xml version="1.0" encoding="UTF-8"?>
竟然在文件开头多了一个空格,导致识别不了文件。不得不承认,有时候问题就是这么纠结而细微:在<?xml前面有个不起眼的空格。
相关文章推荐
- spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
- 在 Spring 配置文件中写 Dubbo 标签报错 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from class path resource
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 52 in XML document from
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
- Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Li
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 23 in XML document from
- Spring加载XSD文件小结(解决nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreE)
- FAQ(37): org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML docume
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
- Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Li
- 错误 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException 解决办法
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from U
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException介绍
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from c