You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Andrey Vasenin (JIRA)" <ji...@apache.org> on 2009/04/29 15:03:32 UTC

[jira] Updated: (WW-3107) NPE whlie use ServletActionRedirectResult as Result type

     [ https://issues.apache.org/struts/browse/WW-3107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Vasenin updated WW-3107:
-------------------------------

    Description: 
This bug was appeared after WW-3046
Example
public ServletActionRedirectResult generate()
        throws Exception
{
        ServletActionRedirectResult redirect = new ServletActionRedirectResult("/namespace", "someaction", "method");
        redirect.addParameter("param", "value");
        return redirect;
}
After execute this method we have caught NPE in codeplace: 
-----ServletActionRedirectResult.class 
(169 line)
ResultConfig resultConfig = invocation.getProxy().getConfig().getResults().get(invocation.getResultCode());
Map resultConfigParams = resultConfig.getParams();
-----ServletActionRedirectResult 
invocation.getResultCode() == null and as result resultConfig == null
Upd: stacktrace
java.lang.NullPointerException
	at org.apache.struts2.dispatcher.ServletRedirectResult.doExecute(ServletRedirectResult.java:170)
	at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
	at org.apache.struts2.dispatcher.ServletActionRedirectResult.execute(ServletActionRedirectResult.java:176)
	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:251)
	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
------cut------


  was:
This bug was appeared after WW-3046
Example
public ServletActionRedirectResult generate()
        throws Exception
{
        ServletActionRedirectResult redirect = new ServletActionRedirectResult("/namespace", "someaction", "method");
        redirect.addParameter("param", "value");
        return redirect;
}
After execute this method we have caught NPE in codeplace: 
-----ServletActionRedirectResult.class 
(169 line)
ResultConfig resultConfig = invocation.getProxy().getConfig().getResults().get(invocation.getResultCode());
Map resultConfigParams = resultConfig.getParams();
-----ServletActionRedirectResult 
invocation.getResultCode() == null and as result resultConfig == null



> NPE whlie use ServletActionRedirectResult as Result type
> --------------------------------------------------------
>
>                 Key: WW-3107
>                 URL: https://issues.apache.org/struts/browse/WW-3107
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.7
>            Reporter: Andrey Vasenin
>
> This bug was appeared after WW-3046
> Example
> public ServletActionRedirectResult generate()
>         throws Exception
> {
>         ServletActionRedirectResult redirect = new ServletActionRedirectResult("/namespace", "someaction", "method");
>         redirect.addParameter("param", "value");
>         return redirect;
> }
> After execute this method we have caught NPE in codeplace: 
> -----ServletActionRedirectResult.class 
> (169 line)
> ResultConfig resultConfig = invocation.getProxy().getConfig().getResults().get(invocation.getResultCode());
> Map resultConfigParams = resultConfig.getParams();
> -----ServletActionRedirectResult 
> invocation.getResultCode() == null and as result resultConfig == null
> Upd: stacktrace
> java.lang.NullPointerException
> 	at org.apache.struts2.dispatcher.ServletRedirectResult.doExecute(ServletRedirectResult.java:170)
> 	at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
> 	at org.apache.struts2.dispatcher.ServletActionRedirectResult.execute(ServletActionRedirectResult.java:176)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
> 	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
> 	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:251)
> 	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
> ------cut------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.