You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Edward W. Rouse" <er...@comsquared.com> on 2011/05/19 17:54:12 UTC
iterate cannot find bean
I have been using struts for years and this is the first time I have been
stumped. This is a long running project (over 6 years) that is using struts
1.3 running under Resin 3.0. I can change the version of struts but not
resin.
This is the line:
<logic:iterate id="task" name='${cache.vars["foundData"] }'>
And this is the error:
2011-05-19 11:15:50.961: Resin javax.servlet.jsp.JspException: Cannot find
bean: "[com.comsquared.workflow.web.util.SortableData@671416,
com.comsquared.workflow.web.util.SortableData@157d162,
com.comsquared.workflow.web.util.SortableData@739136,
com.comsquared.workflow.web.util.SortableData@142880d,
com.comsquared.workflow.web.util.SortableData@f22097,
com.comsquared.workflow.web.util.SortableData@39b3a2,
com.comsquared.workflow.web.util.SortableData@406c7e,
com.comsquared.workflow.web.util.SortableData@192c766,
com.comsquared.workflow.web.util.SortableData@16132c4,
com.comsquared.workflow.web.util.SortableData@4be8b8,
com.comsquared.workflow.web.util.SortableData@19bbd86,
com.comsquared.workflow.web.util.SortableData@1b7d13e,
com.comsquared.workflow.web.util.SortableData@10a7be0,
com.comsquared.workflow.web.util.SortableData@14ab8e4,
com.comsquared.workflow.web.util.SortableData@b08ba7,
com.comsquared.workflow.web.util.SortableData@a0b07b,
com.comsquared.workflow.web.util.SortableData@1a28183,
com.comsquared.workflow.web.util.SortableData@1e4fede]" in any scope
The cache is obviously our caching mechanism and I have used EL similar to
the above to get data. vars is a HashMap<String, Object> and the foundData
object is an ArrayList of data beans.
What confuses me is that the error says it can't find the bean, but it lists
the contents of the bean so it must have found it. Anyone have any idea what
this error actually might be?
Edward W. Rouse
Re: iterate cannot find bean
Posted by Dave Newton <da...@gmail.com>.
On Thu, May 19, 2011 at 12:51 PM, Edward W. Rouse wrote:
> No, the vars HashMap has as many as 50 objects of different names and
> classes in it, plus the bean it used the toString on has the exact contents
> (SortableData beans) of the exact quantity that I expected. Nice thought
> though and I thank you for it.
Okay, but if you try to access a named bean that doesn't exist the
message is the same, isn't it? I'm not saying the bean isn't there:
I'm saying it's using the toString() of what you're looking for as the
bean name.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: iterate cannot find bean
Posted by "Edward W. Rouse" <er...@comsquared.com>.
No, the vars HashMap has as many as 50 objects of different names and
classes in it, plus the bean it used the toString on has the exact contents
(SortableData beans) of the exact quantity that I expected. Nice thought
though and I thank you for it.
Edward W. Rouse
-----Original Message-----
From: Dave Newton [mailto:davelnewton@gmail.com]
Sent: Thursday, May 19, 2011 12:41 PM
To: Struts Users Mailing List
Subject: Re: iterate cannot find bean
On Thu, May 19, 2011 at 11:54 AM, Edward W. Rouse wrote:
> <logic:iterate id="task" name='${cache.vars["foundData"] }'>
>
> [produces the following exception]
>
> 2011-05-19 11:15:50.961: Resin javax.servlet.jsp.JspException: Cannot find
> bean: "[com.comsquared.workflow.web.util.SortableData@671416,
> com.comsquared.workflow.web.util.SortableData@157d162,
> com.comsquared.workflow.web.util.SortableData@739136,
> ...]" in any scope
>
> What confuses me is that the error says it can't find the bean, but it
lists
> the contents of the bean so it must have found it.
I read it differently, in that it's trying to use the toString() of
the cache var as the name of the bean.
Not an answer, but perhaps a clue.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: iterate cannot find bean
Posted by Dave Newton <da...@gmail.com>.
On Thu, May 19, 2011 at 11:54 AM, Edward W. Rouse wrote:
> <logic:iterate id="task" name='${cache.vars["foundData"] }'>
>
> [produces the following exception]
>
> 2011-05-19 11:15:50.961: Resin javax.servlet.jsp.JspException: Cannot find
> bean: "[com.comsquared.workflow.web.util.SortableData@671416,
> com.comsquared.workflow.web.util.SortableData@157d162,
> com.comsquared.workflow.web.util.SortableData@739136,
> ...]" in any scope
>
> What confuses me is that the error says it can't find the bean, but it lists
> the contents of the bean so it must have found it.
I read it differently, in that it's trying to use the toString() of
the cache var as the name of the bean.
Not an answer, but perhaps a clue.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org