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
分享到:
相关推荐
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...
当遇到“cvc-elt.1: 找不到元素 'beans' 的声明”这种异常时,通常意味着Spring在尝试解析XML配置文件时遇到了问题。这个错误提示表明XML解析器无法找到`<beans>`元素的定义,这是一个基本的Spring配置文件结构元素...
Files contained in apt-mirror-api-0.1.jar: ...com.sun.mirror.declaration.ClassDeclaration.class com.sun.mirror.declaration.ConstructorDeclaration.class com.sun.mirror.declaration.Declaration.class ...
标题中提到的“西门子_CE DECLARATION of CONFORMITY.pdf”指的是西门子公司为某产品家族出具的符合性声明文件(CE Declaration of Conformity),这份文件表明了该产品家族符合欧洲共同体的相关指令,并且已经通过...
"ESWA的Declaration of Interest statement(利益声明)word版"是一个重要的文件,它涉及到作者在发表论文时必须公开的任何可能影响其研究成果公正性的财务或个人关系。这份声明通常会伴随论文一同发布,以确保读者...
解决经常遇到的The import org.apache.commons.codec cannot be resolved问题,只需导入文件中的commons-codec-1.11.jar就可以,如和导入包就不赘述了。
duplicate declaration of name (解决方案).md
invalid declaration of function (解决方案).md
implicit declaration of function(解决方案).md
The C++ Standard Library A Tutorial and Reference (2nd Edition)+cppstdlib-code.zip C++标准库(第二版)英文版.pdf 非扫描版+源代码 Prefaceto the SecondEdition xxiii Acknowledgments for the Second...
在配置 SpringMvc 工程时,我们可能会遇到一些问题,例如 Cannot find the declaration of element 'beans' 的错误。在这种情况下,我们需要检查 Spring 配置文件的 schema 声明部分,确保正确的命名空间和版本号。 ...
expected declaration(解决方案).md
An asynchronous, callback-based Http client for Android built on top of Apache's HttpClient libraries. Changelog See what is new in version 1.4.9 released on 19th September 2015 ...Javadoc ...
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...
requirement analysis •conceptual database design •choice of the DBMS •data model mapping •physical design •implementation
The Way to Go,: A Thorough Introduction to the Go Programming Language 英文书籍,已Cross the wall,从Google获得书中源代码,分享一下。喜欢请购买正版。 目录如下: Contents Preface......................
`Element`还有`find()`, `findall()`, 和 `iterfind()`方法,用于查找指定路径的元素。 ```python for child in root: print(child.tag, child.attrib) # 打印所有子元素的标签和属性 # 查找指定路径的元素 ...
RoHS(Restriction of Hazardous Substances,有害物质限制)是一项欧盟法规,旨在限制电子电气设备中的特定有毒物质,以保护人类健康和环境。RoHS合规性对于IT行业至关重要,因为它影响产品设计、制造、销售以及...
RzBorder.pas Number of elements differs from declaration TRzLEDCharacters 在装完Raize控件之后编译老是出如下错误: [Pascal Error] RzBorder.pas(1429): E2072 Number of elements (125) differs from ...
这个规则导致了典型的悬挂e l s e二义性,可以用一种标准的方法解决:e l s e部分通常作为当前i f的一个子结构立即分析(“最近嵌套”非二义性规则)。 16. iteration_stmt -> while ( expression ) statement w h i l...