Hi,
I am using eclipse Helios to develop a
Struts 2 (using Struts 2.3.4.1.jar) application. I have added the jar files. I started developing as Dynamic Web Project in Eclipse. I am also using spring with the application.
When I call any action class, NullPointerException is thrown in StrutsActionProxy.java.
java.lang.NullPointerException
org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:501)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:432)
While debugging the code, I found the cause for this: It says HttpServletRequest.java cannot be resolved. It is indirectly referenced from required .class files
I feel there are 2 jar files which contains the class. I found one is in spring-web-3.0.jar. And other will be automatically included by eclipse for a dynamic web project. I could not remove the spring jar because it contains ContextLoaderListner.class
I searched for possible solution. But I could not find any.
Any help is appreciated.
Thanks.