首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > Ruby Rails >

Struts2的一个有关问题!Caused by: java.lang.NoClassDefFoundError: org/springframework/co

2012-10-31 
Struts2的一个问题!Caused by: java.lang.NoClassDefFoundError: org/springframework/cont关键字: struts

Struts2的一个问题!Caused by: java.lang.NoClassDefFoundError: org/springframework/cont
关键字: struts2
问题:

Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware

原因:

Struts2的struts2-spring-plugin-2.0.11.jar等jar包需要使用ApplicationContextAware 去找Spring的

Context,结果ApplicationContextAware类都找不到!

解决方法(选择一种方法即可):

方法1.在Struts2项目中只保留Struts2的5个必须的包,其他全部删除

5个必须的包是:
        commons-logging-1.0.4.jar
        freemarker-2.3.8.jar        
        ognl-2.6.11.jar
        struts2-core-2.0.11.1.jar
        xwork-2.0.4.jar

方法2:

你的项目需要Spring的话,把Spring的包加进来也可以!




摘自:http://blog.csdn.net/liuxiaotao008/archive/2008/07/18/2672200.aspx

热点排行