zoukankan      html  css  js  c++  java
  • struts2没有spring的情况下加了struts2-spring-plugin-2.3.24.1.jar导致错误

    1. Unable to load configuration. - bean - jar:file:/F:/Documents/MyJava/Spring114/out/artifacts/Spring114_war_exploded/WEB-INF/lib/struts2-spring-plugin-2.3.24.1.jar!/struts-plugin.xml:29:132
    1. Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/F:/Documents/MyJava/Spring114/out/artifacts/Spring114_war_exploded/WEB-INF/lib/struts2-spring-plugin-2.3.24.1.jar!/struts-plugin.xml:29:132
    2. at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:247)
    3. at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    4. at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
    5. at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    6. ... 53 more
    7. Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware
    如果没有spring的情况下,加入了struts2-spring-plugin,那么就会连接这两者,而这个ApplicationContextAware:

    接口(ApplicationContextAware),这个类就可以方便获得ApplicationContext中的所有bean。换句话说,就是这个类可以直接获取spring配置文件中,所有有引用到的bean对象。


    解决方法,要么删掉这个jar包,要么加入spring框架...








  • 相关阅读:
    1462. 课程安排 IV
    最全的CSS浏览器兼容问题【FF与IE】
    this&super两个关键字的意义和用法
    Javascript this 的一些总结
    JS-封装类或对象的最佳方案
    背景色透明,里面内容(图片、文字)不透明
    css3 前端开发
    html5游戏之Box2d物理引擎集成
    Box2d引擎之元素
    西天取经第一步——制作自己的HTML5游戏
  • 原文地址:https://www.cnblogs.com/share2015/p/5304536.html
Copyright © 2011-2022 走看看