Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
来源:互联网 发布:php冒泡排序代码 编辑:程序博客网 时间:2024/05/16 01:17
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 4 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
Spring官网出了问题, 命名空间文件不能找到, 当然出问题了. 他的解决办法就是: 等Spring官网好了再试.
我也觉得这很有道理, 也在QQ群里给几个合作伙伴发消息说由于Srping官网出了问题, 聊天室不能调试.
但是越想越觉得很不安. 那岂不是所有的用到Spring的应用程序都要依赖Spring官网了?
这太危险了, 万一哪天官网彻底出问题了(当然这种可能是很小的了), 那所有的程序不都完了?
再说了命名空间文件可以下载下来放在本地的, 为什么一定要联网用呢? 那万一那天没有联网, 岂不不能做启动应用了?
在百度里找了很久, 没有找到解决办法. 上下Google找, 还不错, 找到了, 有位网友解决了此问题, 貌似很简单:
---------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
解决:等一会果然自己好了
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'(转)
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'(转)
- spring项目启动报错 cvc-elt.1: Cannot find the declaration of element 'beans'.
- cvc-elt.1: Cannot find the declaration of element 'beans'.
- cvc-elt.1: Cannot find the declaration of element 'beans'.
- cvc-elt.1: Cannot find the declaration of element 'beans'
- Spring cvc-elt.1: Cannot find the declaration of element 'beans'.
- Spring 配置文件报错: cvc-elt.1: Cannot find the declaration of element ""beans""
- spring cvc-elt.1: Cannot find the declaration of element 'beans'
- spring cvc-elt.1: Cannot find the declaration of element 'beans'解决办法
- spring cvc-elt.1: Cannot find the declaration of element 'beans'解决办法
- spring cvc-elt.1: Cannot find the declaration of element 'beans'解决办法
- 配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.
- Spring 2.0.8 和 2.5 applicationContext.xml 头文件写法 Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- 动态设置android最小版本
- Java 读取HTML页面源代码工具类
- 使用webService时,gsoap数据类型注意事项
- tomcat启动报错:Error configuring application listener of class org.springframework.web.context.ContextLo
- Mapreduce不设置reduce,只执行map的输出结果
- Spring启动异常: cvc-elt.1: Cannot find the declaration of element 'beans'
- Linq to sql 之 DataContext 与实体 简介
- FFMPEG详细参数
- ACM中java的使用
- 20130814, 微软8月14日发布8个安全补丁
- 关于iMatrix平台流程引擎事件处理之业务补偿分析
- ajax上传文件到linux服务器
- 定时每天备份mysql并定时删除上月备份脚本
- 强类型 DataContext