中国java开源文档大全
java教程,java开源文档大全
java教程,java开源文档大全
首页 java基础 web开发框架 开发工具 应用系统 组件类库 搜索爬虫 J2EE服务器 持久层相关 测试工具 访客留言 投稿专栏 站内搜索
java教程,java开源文档大全
>首页 -> 组件类库 -> AOP -> Spring 2.5

TOP

spring2.5 bean.xml 命名空间相关的错误
[ 录入者:admin | 时间:2007-12-08 05:01:00 | 作者: | 来源:原创 | 浏览:23次 ]
  java开源文档大全致力于打造中国最大最全的开源文档,它提供了最全面最权威的开源资料,同时为大家提供一个交流的平台,如果您有好的想法,欢迎您投稿.


有一个配置文件,命名空间如下:

<!--l version="1.0" encoding="UTF-8-->
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
    
运行以后就报错:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 3 in XML document from file [C:\projects\rain\bean.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:369)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)

这应该是一个命名空间设置不对的问题,如果改成

<!--l version="1.0" encoding="UTF-8-->
       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">
        
   

问题解决。



  java开源文档研究struts,webwork,spring,tomcat,jboss,lucense,nutch,JUnit,eclipse......,如果您有什么意见,欢迎评论和留言.
[下一篇]Spring 2.5: Drop-in upgrade for.. [上一篇]Spring 2.0寒冬里的“春天”特性

评论

称  呼:
内  容:

google

相关栏目

最新文章

热门文章

推荐文章

更多友情链接>>>