ested exception is org.xml.sax.SAXParseException; lineNumber: 23; columnNumber: 106; cvc-elt.1: 找不到

前端之家收集整理的这篇文章主要介绍了ested exception is org.xml.sax.SAXParseException; lineNumber: 23; columnNumber: 106; cvc-elt.1: 找不到前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

错误信息:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 23 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 23; columnNumber: 106; cvc-elt.1: 找不到元素 'beans' 的声明。




  1. <beans xmlns="http://www.springframework.org/schema/beans"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:tx="http://www.springframework.org/schema/tx"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
  6. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
  7. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">-->

  1. xmlns="http://www.springframework.org/schema/beans"
在xsi:schemaLocation中没有,对应的 xsd 解析文件

添加相应的xsd即可

  1. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">-->

  1. xmlns="http://www.springframework.org/schema/beans"
在xsi:schemaLocation中没有,对应的 xsd 解析文件

猜你在找的XML相关文章