You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jon Wilmoth <jo...@yahoo.com> on 2007/05/17 01:05:35 UTC
[s2] ognl.NoSuchPropertyException with param passing redirect-action
I'm getting the following stacktrace using 2.0.7 while trying to pass action values during an action redirect result (action config below) and I'm wondering if this is a bug with the test build I'm using or if this is user error (probably the later). I followed the http://www.mail-archive.com/user@struts.apache.org/msg59492.html thread in setting up the action. Interestingly enough I do see this in the log (after the WARN), which is all that I would've expected:
May-16-2007 3:44:51:781 PM, PDT [DEBUG] (org.apache.struts2.dispatcher.ServletRedirectResult) - Redirecting to finalLocation /member/loadMyObjectInput.action?subDetail.id=2
May-16-2007 3:44:51:781 PM, PDT [WARN ] (com.opensymphony.xwork2.util.OgnlUtil) - Caught OgnlException while setting property subDetail.id' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'.
ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.course
at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.getProperty(OgnlValueStack.java:58)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643)
at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTChain.setValueBody(ASTChain.java:168)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
at ognl.SimpleNode.setValue(SimpleNode.java:246)
at ognl.Ognl.setValue(Ognl.java:476)
at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360)
at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76)
at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49)
at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:219)
at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:190)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:337)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor.intercept(ParameterFilterInterceptor.java:143)
<action name="saveMyObject" class="MyObjectAction" method="save">
<interceptor-ref name="paramFilter">
<param name="blocked">label.btn.save,dojo.datePlayed</param>
</interceptor-ref>
<interceptor-ref name="formStack"/>
<result name="success">/member/saved.jsp</result>
<result name="input" type="redirect-action">
<param name="actionName">loadMyObjectInput</param>
<param name="parse">true</param>
<param name="subDetail.id">${subDetail.id}</param>
</result>
<result name="biz.error" type="redirect-action">
<param name="actionName">loadMyObjectInput</param>
<param name="parse">true</param>
<param name="subDetail.id">${subDetail.id}</param>
</result>
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [s2] ognl.NoSuchPropertyException with param passing redirect-action
Posted by Dave Newton <ne...@yahoo.com>.
Does it not work or are you just getting the WARN?
With devmode turned on I'm pretty sure I've seen the
same logs for previous versions as well.
d.
--- Jon Wilmoth <jo...@yahoo.com> wrote:
> I'm getting the following stacktrace using 2.0.7
> while trying to pass action values during an action
> redirect result (action config below) and I'm
> wondering if this is a bug with the test build I'm
> using or if this is user error (probably the later).
> I followed the
>
http://www.mail-archive.com/user@struts.apache.org/msg59492.html
> thread in setting up the action. Interestingly
> enough I do see this in the log (after the WARN),
> which is all that I would've expected:
>
> May-16-2007 3:44:51:781 PM, PDT [DEBUG]
>
(org.apache.struts2.dispatcher.ServletRedirectResult)
> - Redirecting to finalLocation
> /member/loadMyObjectInput.action?subDetail.id=2
>
> May-16-2007 3:44:51:781 PM, PDT [WARN ]
> (com.opensymphony.xwork2.util.OgnlUtil) - Caught
> OgnlException while setting property subDetail.id'
> on type
>
'org.apache.struts2.dispatcher.ServletActionRedirectResult'.
>
> ognl.NoSuchPropertyException:
>
org.apache.struts2.dispatcher.ServletActionRedirectResult.course
>
> at
>
ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
>
> at
>
com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.getProperty(OgnlValueStack.java:58)
>
> at
> ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643)
> at
> ognl.ASTProperty.getValueBody(ASTProperty.java:92)
> at
>
ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
>
> at ognl.SimpleNode.getValue(SimpleNode.java:210)
> at ognl.ASTChain.setValueBody(ASTChain.java:168)
> at
>
ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>
> at ognl.SimpleNode.setValue(SimpleNode.java:246)
> at ognl.Ognl.setValue(Ognl.java:476)
> at
>
com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
>
> at
>
com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360)
>
> at
>
com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76)
>
> at
>
com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49)
>
> at
>
com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:219)
>
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:190)
>
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:337)
>
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>
> at
>
com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor.intercept(ParameterFilterInterceptor.java:143)
>
>
>
> <action name="saveMyObject" class="MyObjectAction"
> method="save">
> <interceptor-ref name="paramFilter">
> <param
>
name="blocked">label.btn.save,dojo.datePlayed</param>
>
> </interceptor-ref>
> <interceptor-ref name="formStack"/>
> <result name="success">/member/saved.jsp</result>
> <result name="input" type="redirect-action">
> <param
> name="actionName">loadMyObjectInput</param>
> <param name="parse">true</param>
> <param
> name="subDetail.id">${subDetail.id}</param>
> </result>
> <result name="biz.error" type="redirect-action">
> <param
> name="actionName">loadMyObjectInput</param>
> <param name="parse">true</param>
> <param
> name="subDetail.id">${subDetail.id}</param>
> </result>
> </action>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
____________________________________________________________________________________Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org