`

org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element

    博客分类:
  • Java
 
阅读更多

org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

 

如果在项目中遇到该异常,通常是项目无法下载到spring-beans-2.5.xsd文件而出现的问题,这里的版本号因项目版本而异。

 

这里需要配置本地的xsd文件,方法如下:

 

找到你的项目中引用的spring的核心包,spring.jar

 

用压缩文件打开,找到该路径

 

org/springframework/beans/factory/xml/

 

并将这个路径下的xsd文件以下列形式配置到applicationContext.xml文件中,如果有多个配置文件,则全部代替

 

即以

 

classpath:/org/springframework/beans/factory/xml/spring-beans-2.5.xsd

 

代替

 

 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 

使得从本地直接读取该配置文件

 

链接:http://blog.csdn.net/wengang285/article/details/7587264

 

按照此方法解决了问题。

分享到:
评论

相关推荐

    org.xml.sax.SAXException: Invalid element

    NULL 博文链接:https://wilian.iteye.com/blog/1992365

    Matlab高阶谱分析(HOSA)工具箱及安装方法

    org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'area'. One of '{MathWorksID, type}' is expected. 运行hosaver: Warning: Could not find an exact ...

    java调用net开发的webservice实例

    javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: The element type "p" must be terminated by the matching end-tag ...

    BeRoot, 特权升级项目 Windows/Linux/Mac.zip

    BeRoot, 特权升级项目 Windows/Linux/Mac BeRoot项目BeRoot项目是一个发布工具,用于检查常见的以找到一种方法来升级我们的特权。它已经被添加到 pupy 项目作为一个post开发模块( 所以它将在内存中执行而不需要触摸...

    2020-10-29日自己保存华为短信开发包smproxy.rar

    好多版本是会报错的,[Fatal Error] :24:28: An ... org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xd863) was found in the element content of the documen.,这个版本是纠正过后重新打包做的

    华为短信开发包smproxy.jar,完美无bug版

    好多版本是会报错的,[Fatal Error] :24:28: An ... org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xd863) was found in the element content of the documen.,这个版本是纠正过后重新打包做的

    XML Programming Bible

    Chapter 1: XML Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 2: XML Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Chapter 3: XML ...

    解决dubbo启动的时候报错,无法读取方案文档 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd'

    解决启动dubbo项目的时候出现,无法读取方案文档 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd',其实在你本地把dubbo.jar文件解压,然后在META-INF下边就有个dubbo.xsd,就是他

    DOM-and-SAX-implementation:使用 DOM 和 SAX 实现的 xml 解析

    更新 1:-> -> xml("User.xml) 与 DTD 的验证已在包验证中完成。验证已使用 DOM 和 SAX 完成。更新 2:-> -> 验证包中添加了针对 xsd 的 xml 验证。 实现代码在“XsdValidation.java”类中。更新 3:-> -> XSL 实现已...

    dubbo.xsd 下载

    org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd', because 1) could not find the document; 2) the document could ...

    Wrox.Beginning.Xml.2ed-Xml.Schemas.Soap.Xslt.Dom.And.Sax.2.0.rar

    SAX的工作原理简单地说就是对文档进行顺序扫描,当扫描到文档(document)开始与结束、元素(element)开始与结束、文档(document)结束等地方时通知事件处理函数,由事件处理函数做相应动作,然后继续同样的扫描,...

    SAX.java 操作xml文件

    SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件

    解析XML所需的jar dom.jar dom4j.jar sax.jar jdom.jar

    解析XML所需的jar dom.jar dom4j-1.6.1.jar dom4j-2.0.2.jar dom4j-2.1.1.jar sax-2.0.1.jar jdom-2.0.6.jar 注意:dom4j-2.1.1.jar需要jdk8

    xmlrpc android

    android调用xmlrpc的方法会出现错误 javax.xml.parsers.ParserConfigurationException: org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/external-parameter-entities。 本文通过自己的方法来...

    SAX符号化序列范例源码

    str1: first string str2: second string alphabet_size: alphabet size used to construct the strings compression_ratio: original_data_len / symbolic_len Output: dist: lower-bounding distance ...

    mybatis-config.xml文件配置问题

     Cause: org.xml.sax.SAXParseException; lineNumber: 99; columnNumber: 17; 元素类型为 “configuration” 的内容必须匹配 “(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWra

    Javase-6.0_中文API_HTML(最新更新)

    javase 中文API 最新版 ******************************* JavaTM 2 Platform Standard Ed.... 所有类软件包 java.applet java.awt ...javax.lang.model.element ...javax.xml ...org.xml.sax.helpers

    dom.sax.pull解析

    Java解析XML的三种方式 ...Ø 2、SAX(org.xml.sax) Ø SimpleAPI for XML,以事件的形式通知程序,对Xml进行解析。 Ø 3、XMLPULL(org.xmlpull.v1) Ø 类似于SAX方式,程序以“拉取”的方式对Xml进行解析。

    jdk 中文版

    java jdk api帮助文档中文版 JavaTM Platform Standard Ed. 6 所有类 软件包 java.applet java.awt java.awt.color java.awt.datatransfer java.awt.dnd ...javax.lang.model.element ...org.xml.sax.helpers

    lichee_20170502_1607_全志R16的linux系统编译需要改动的文件_使用parrotv1.1的内核_没有外层目录.7z

    libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl texinfo 升级了 0 个软件包,新安装了 28 个软件包,...

Global site tag (gtag.js) - Google Analytics