Hi,

The parameter is definitely an object, if I replace the JSP below with

<h1><s:property value="photoSet.keywordListLazyLoad"/></h1>
<h1><s:property value="photoSet.keywordListLazyLoad.id"/></h1>

I get keywordl...@3bcdf1, 15

which is correct. Furthermore if I add a setKeywordList(String[] param) method or setKeywordList(String param) method into the action class, it never invokes those new methods but still throws exactly the same exception.

The only other thing I can think of is that it's trying to set the cglib proxy object on the action class and is complaining about that. We are using cglib-nodep-2.2 to lazy load the KeywordList, and it worked perfectly fine in Struts 2.0.

(Sorry if this appears multiple times, I keep getting a spam rejection notice.)

Raj.

On 6:59 AM, Li Ying wrote:
"[Ljava.lang.String;" means a String array.

Looks like you are trying to copy a List from one action to another.

By somehow, struts2 is looking for a set method which take a String
array as it's parameter.



2010/11/15 Raj Nagappan<r...@velocitylabs.com>:
Hi, we recently upgraded from Struts 2.0.14 to 2.2.1 and I notice that

the following JSP code to inject an object property from one action into
another action has stopped working:

<s:if test=hotoSet.keywordListLazyLoad != null">
<s:action namespace=search" name="KeywordList" executeResult="true"
ignoreContextParams=rue">
<s:param name=eywordList" value="photoSet.keywordListLazyLoad"/>
</s:action>
</s:if>

So it checks that the object is not null and then tries to set it on the
parameter "keywordList". This worked perfectly fine in 2.0.x, but in 2.2
on the server side we get:

java.lang.NoSuchMethodException:
KeywordListAction.setKeywordList([Ljava.lang.String;)
   at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1226)
   at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1474)
   at
ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85)
   at
ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)

And the resulting error displayed on the web page is:

Exception name: No result defined for action KeywordListAction and
result input
No result defined for action KeywordListAction and result input at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:375)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept
(AnnotationValidationInterceptor.java:68) at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept

Is this a bug or do I need to do something differently for 2.2?

Raj.



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




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

Reply via email to