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框架...








  • 相关阅读:
    <转载>c#多线程:线程池和异步编程
    <转载>讲故事谈.NET委托:一个C#睡前故事
    IIS 7.0 成员管理配置
    呵呵,新开博!
    PHP函数中文文档
    请不要做浮躁的人对程序员的忠告
    php新闻发布完成
    JS调试工具
    PHP配置FCKEditor
    ACEGI配置总结(1)
  • 原文地址:https://www.cnblogs.com/share2015/p/5304536.html
Copyright © 2011-2022 走看看