Hi,
I'm getting an NPE when trying to use DWR validation in Struts 2.1.6.
Basically, porting a Struts 2.0.x app that used DWR validation.

The ValueStackFactory is null during the invocation and this throws the NPE
while calling valueStackFactory.createValueStack(); 
In normal invocation, all is fine.

How is the valueStackFactory set ? . Do i need to add any config so that the
DWR flow initializes valueStackFactory properly?

Below is the stacktrace and web.xml config:


[4/24/09 17:25:15:942 IST] 0000002b DWRValidator  E
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error Error while
trying to validate
                                 java.lang.NullPointerException
        at
com.opensymphony.xwork2.DefaultActionInvocation.createContextMap(DefaultActionInvocation.java:331)
        at
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:377)
        at
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
        at
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
        at
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
        at 
org.apache.struts2.validators.DWRValidator.doPost(DWRValidator.java:106)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:233)
        at
uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
        at
uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:83)
        at
uk.ltd.getahead.dwr.AbstractDWRServlet.doPost(AbstractDWRServlet.java:162)

---------web.xml---------------
<filter>
        <filter-name>struts2</filter-name>

<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
<init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
---------end web.xml---------------

Any help is very much appreciated,
s2user


-- 
View this message in context: 
http://www.nabble.com/DWRValidator-not-working-in-Struts-2.1.6-tp23215316p23215316.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to