Caused by: java.lang.NullPointerException at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:209)
大致是不能得到struts2的action管理对象,使用三大框架继承时,使用struts2-spring-plugin-2.2.1.jar这个插件时,spring ioc容器会代为管理struts2的action对象 原因:
1, 没用使用到这个包
2,使用这个包后没有在web.xml中配置 需加上监听
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
3,其他包冲突 博主就是因为 包冲突 以org.springframework.web.context开头的包有两个,删掉小的就好了
补充, 如何删掉myEclipse中的包,方法:先删掉引用(包名后带路径) ,然后在删除包 不然会报错