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








相关文章:

  • 2022-01-12
  • 2021-07-20
  • 2021-09-12
  • 2022-12-23
  • 2021-12-12
  • 2021-07-01
  • 2021-08-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
相关资源
相似解决方案