| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 959 人关注过本帖
标题: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
快速回复:struts2 + spring2.5 spring配置出错
数据加载中...
 
   



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

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