`
banlalaotou
  • 浏览: 77986 次
  • 性别: Icon_minigender_1
  • 来自: 保定
社区版块
存档分类

Spring开发过程中遇到的错误集锦(持续更新)

阅读更多

 

(1)这个错误是由于xml文件第一行多了一空行。

解决方法: 删除xml文件后的空行。

错误信息:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from class path resource [beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

 

 

(2) 这个错误是由于缺少了对 beans.ml 文件中的元素 beans 的描述信息。

解决方法: 百度(Google)一下,增加关于 beans 的描述信息。

错误信息:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from class path resource [ beans.xml ] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics