标题:struts2 + spring2.5 spring配置出错
只看楼主
xy_arrow
Rank: 1
来 自:湖北十堰
等 级:新手上路
帖 子:14
专家分:0
注 册:2009-2-3
 问题点数:0 回复次数:2 
struts2 + spring2.5 spring配置出错
applicationContext.xml 配置代码
 
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.
    xmlns:aop="http://www. xmlns:p="http://www.
    xmlns:tx="http://www. xmlns:xsi="http://www.
    xsi:schemaLocation="http://www.
    http://www.
    http://www.
    http://www.
    http://www.
    http://www.
   <bean id="loginService" class="com.ss.xy.service.impl.LoginServiceImpl"></bean>
   <!--
      <bean id="loginAction" class="com.ss.xy.action.LoginAction" scope="prototype">
           依赖注入业务逻辑
          <property name="loginServiceImpl" ref="loginService" />
       </bean>
    -->
</beans>

运行:
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

什么原因啊  查了下 说法不同
查了2种解决办法 都不行 其他的都是转别人的...
有遇到的没
怎么解决?
搜索更多相关主题的帖子: spring 
2010-09-29 10:15
liusuifeng
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-9-29
得分:0 
也许是包冲突了。看看网上struts2+spring2.5环境所需要的包。
2010-09-29 11:16
xy_arrow
Rank: 1
来 自:湖北十堰
等 级:新手上路
帖 子:14
专家分:0
注 册:2009-2-3
得分:0 
昨天跑的还是好的 今天在运行 就出这个错了
2010-09-29 12:18



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-321653-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.227037 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved