读书人

Spring开发过程中遇到的异常集锦(持续

发布时间: 2012-08-22 09:50:35 作者: rapoo

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'.

?

?

?

?

读书人网 >软件开发

热点推荐