我的工程启动的时候总是报org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
用的是spring 2.x
配置文件是这么写的
<?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.0.xsd">
    <bean id="tagAction" class="TagAction" scope="prototype">
  <property name="tagDao" ref="tagDao" />
    </bean>
</beans>怎么回事?

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【TDwebber】截止到2008-07-04 15:04:16的历史汇总数据(不包括此帖):
    发帖的总数量:2                        发帖的总分数:40                       
    结贴的总数量:1                        结贴的总分数:20                       
    无满意结贴数:0                        无满意结贴分:0                        
    未结的帖子数:1                        未结的总分数:20                       
    结贴的百分比:50.00 %               结分的百分比:50.00 %                  
    无满意结贴率:0.00  %               无满意结分率:0.00  %                  
    楼主加油
      

  2.   

    <beans>
    <bean></bean>
    </beans>
      

  3.   

    <?xml version="1.0"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans></beans>
      

  4.   

    楼上写的是1.x版本的dtd声明方式
    2.x可以使用schema方式声明吗不是。
      

  5.   

    而且我改成dtd方式的话scope="prototype"就非法了。
      

  6.   

    看一下是否存在不同版本的spring 的jar
      

  7.   

    唉,这个也查了啊,整个resin就部署了一个工程,哪还可能有spring.jar呢?
      

  8.   

    给你几个网址都说有spring 1.x 的jar
    http://forum.springframework.org/showthread.php?t=37877
    http://forum.springframework.org/showthread.php?t=41679
      

  9.   

    我用的是resion 3.1.6
    resin里可能有spring吗?