Spring配置文件xsi:schemaLocation无法解析导致启动失败的解决方案 转!classpath:/org/springframework/
来源:互联网 发布:amuse事务所 知乎 编辑:程序博客网 时间:2024/05/16 01:09
Spring配置文件xsi:schemaLocation无法解析导致启动失败的解决方案本文转自:http://www.jnan.org/archives/2010/12/cannot-find-the-declaration-of-element-beans.html今天向服务器部署一个console java app之后,启动时发现程序出现异常:Exception in thread “main” org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from class path resource [app-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ‘beans’.然后去看看app-config.xml里的schema声明部分,是这样写的:<beans xmlns=”http://www.springframework.org/schema/beans”xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”xmlns:context=”http://www.springframework.org/schema/context”xsi:schemaLocation=”http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsd” >很明显,有关’beans’的声明都放在http://www.springframework.org/schema/beans/spring-beans-3.0.xsd里面了。可能是网络原因,访问不倒导致解析app-config.xml失败,致使程序抛出异常。打开spring-beans-3.0.1.RELEASE.jar一看,那个xsd文件就在org.springframework.beans.factory.xml包下面,这下子好办了,把xsd文件的引用全改为本地的就行了:<beans xmlns=”http://www.springframework.org/schema/beans”xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”xmlns:context=”http://www.springframework.org/schema/context”xsi:schemaLocation=”http://www.springframework.org/schema/beansclasspath:/org/springframework/beans/factory/xml/spring-beans-3.0.xsdhttp://www.springframework.org/schema/contextclasspath:/org/springframework/context/config/spring-context-3.0.xsd” >
0 0
- Spring配置文件xsi:schemaLocation无法解析导致启动失败的解决方案 转!classpath:/org/springframework/
- Spring配置文件xsi:schemaLocation无法解析导致启动失败的解决方案
- spring配置文件xsi:schemaLocation无法解析导致启动失败的解决方案
- Spring配置文件xsi:schemaLocation无法解析导致启动失败的解决方案
- eclipse中配置Spring的xsi:schemaLocation
- Spring读取配置文件org.springframework.beans.factory.BeanCreationException异常产生的原因和解决方案
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- XML文档的xmlns、xmlns xsi和xsi schemaLocation
- xml中 xmlns,xmlns:xsi,xsi:schemaLocation 表示的意思
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- Linux系统多线程讲解与实现,包含服务器实现、信号处理
- C++ 继承中 方法的使用
- JDBC
- 同一TOMCAT下不同WEB工程之间实现SESSION共享的办法,可用来处理单点登录。
- Ubuntu apt-get apt-cache 命令使用
- Spring配置文件xsi:schemaLocation无法解析导致启动失败的解决方案 转!classpath:/org/springframework/
- 人工神经网络学习笔记_Hamming网络_竞争网络
- three.js 简介
- svn插件安装
- 滤波器设计中的频率归一化问题
- sql查看数据库连接数
- 左右等高div
- Struts2+Spring3+hibernate4 事务代理,查询,插入都可以,更新和删除不行。
- 我不是回文,你呢。。