You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Francillon <ma...@marlboro.edu> on 2008/02/23 14:42:30 UTC

"No getter method for property foo of bean bar" --really?

Hi,

I'm gnashing my teeth over the following, and solicit help.

I'm involved in moving an older (Struts 1.2, JDK 1.4, Tomcat 5.0) app, 
currently running in production under Linux, to Windows (don't ask). 
Simply by copying the whole web app tree over (and adjusting Tomcat's 
server.xml on the Windows side), I get large areas of the app's 
functionality working just fine.

However hitting on one particular JSP, I run into this...

2008-02-21 08:43:44 ApplicationDispatcher[/jsp] Servlet.service() for 
servlet jsp threw exception
javax.servlet.jsp.JspException: No getter method for property 
timeslotManager.reservationTimeslot.startDateString of bean 
reservationListForm

...where the offending code in the JSP appears to be this:

<bean:write name="reservationListForm"
   property="timeslotManager.reservationTimeslot.startDateString" />

1. Now I know what you're thinking--capitalization problem--but it's not 
that, honest (I just checked for the hundredth time). 
ReservationListForm has getTimeslotManager(), ReservationTimeslotManager 
has getReservationTimeslot(), and ReservationTimeslot has 
getStartDateString().

2. The app is running without these errors under Linux.

3. If I run the app under Eclipse's debugger and set a breakpoint just 
before the bean:write, I can see 'reservationListForm' sitting in the 
session and navigate through to the ReservationTimeSlot object. All the 
expected objects are sitting there, everything looks just right.

4. If I insert a scriptlet into the JSP immediately before the 
bean:write, I can walk the object graph without error, and get back the 
expected values from the method calls:

   <%
     ReservationListForm rlf = (ReservationListForm)
       session.getAttribute("reservationListForm");
     ReservationTimeslotManager rtm = rlf.getTimeslotManager();
     ReservationTimeslot rt = rtm.getReservationTimeslot();
     String startDateString = rt.getStartDateString();
     ...
   %>

5. Can't access any other properties of 'reservationTimeslot' either.
And if I try shortening the chain of nested properties...

   <bean:write name="reservationListForm" property="timeslotManager"/>

...runs without error, but...

   <bean:write name="reservationListForm"
     property="timeslotManager.reservationTimeslot"/>

...again brings the "No getter method..." error.

6. Same behavior if I move the app to OS X.

This is all amusing, of course, but I'd like to move on to other things. 
Does it ring any bells? Any suggestions about other things I might try 
looking at?

Thanks, Mark

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


Re: "No getter method for property foo of bean bar" --really?

Posted by mfrancillon <ma...@marlboro.edu>.

newton.dave wrote:
> 
> 
> If it were me I'd try running under a different JVM first, because it's
> easy,
> 

I see the same behavior under java 5 on OS X.



> it's still an unknown (to me), etc. It surprises me a little that the
> weird
> behavior is on both Win and OSX. If you can isolate the issue to a minimal
> 
True.


> testcase and host it somewhere I can look at it under OSX.
> 
Thanks for the offer and for the suggestions.

Mark

-- 
View this message in context: http://www.nabble.com/%22No-getter-method-for-property-foo-of-bean-bar%22---really--tp15652192p15654498.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: "No getter method for property foo of bean bar" --really?

Posted by Dave Newton <ne...@yahoo.com>.
--- mfrancillon <ma...@marlboro.edu> wrote:
> newton.dave wrote:
> > Have you tested under a different JVM version? Are the libraries on the
> > classpath (both your apps and Tomcat's) precisely identical across
> > environments?
> The VM that I've used is (some sub-version of) 1.4.2 in all cases.

Dunno about you, but "some sub-version" doesn't exactly fill me with comfort.

> The libraries on the app's classpath are precisely identical because the
> apps are precisely identical. The libraries on the container's classpath
> are precisely identical.

If you say so.

If it were me I'd try running under a different JVM first, because it's easy,
it's still an unknown (to me), etc. It surprises me a little that the weird
behavior is on both Win and OSX. If you can isolate the issue to a minimal
testcase and host it somewhere I can look at it under OSX.

Dave


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


Re: "No getter method for property foo of bean bar" --really?

Posted by mfrancillon <ma...@marlboro.edu>.


newton.dave wrote:
> 
> Have you tested under a different JVM version? Are the libraries on the
> classpath (both your apps and Tomcat's) precisely identical across
> environments?
> 

The VM that I've used is (some sub-version of) 1.4.2 in all cases.

The libraries on the app's classpath are precisely identical because the
apps are precisely identical. The libraries on the container's classpath are
precisely identical.


Mark
-- 
View this message in context: http://www.nabble.com/%22No-getter-method-for-property-foo-of-bean-bar%22---really--tp15652192p15653226.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: "No getter method for property foo of bean bar" --really?

Posted by Dave Newton <ne...@yahoo.com>.
Have you tested under a different JVM version? Are the libraries on the
classpath (both your apps and Tomcat's) precisely identical across
environments?

Dave

--- Mark Francillon <ma...@marlboro.edu> wrote:

> Hi,
> 
> I'm gnashing my teeth over the following, and solicit help.
> 
> I'm involved in moving an older (Struts 1.2, JDK 1.4, Tomcat 5.0) app, 
> currently running in production under Linux, to Windows (don't ask). 
> Simply by copying the whole web app tree over (and adjusting Tomcat's 
> server.xml on the Windows side), I get large areas of the app's 
> functionality working just fine.
> 
> However hitting on one particular JSP, I run into this...
> 
> 2008-02-21 08:43:44 ApplicationDispatcher[/jsp] Servlet.service() for 
> servlet jsp threw exception
> javax.servlet.jsp.JspException: No getter method for property 
> timeslotManager.reservationTimeslot.startDateString of bean 
> reservationListForm
> 
> ...where the offending code in the JSP appears to be this:
> 
> <bean:write name="reservationListForm"
>    property="timeslotManager.reservationTimeslot.startDateString" />
> 
> 1. Now I know what you're thinking--capitalization problem--but it's not 
> that, honest (I just checked for the hundredth time). 
> ReservationListForm has getTimeslotManager(), ReservationTimeslotManager 
> has getReservationTimeslot(), and ReservationTimeslot has 
> getStartDateString().
> 
> 2. The app is running without these errors under Linux.
> 
> 3. If I run the app under Eclipse's debugger and set a breakpoint just 
> before the bean:write, I can see 'reservationListForm' sitting in the 
> session and navigate through to the ReservationTimeSlot object. All the 
> expected objects are sitting there, everything looks just right.
> 
> 4. If I insert a scriptlet into the JSP immediately before the 
> bean:write, I can walk the object graph without error, and get back the 
> expected values from the method calls:
> 
>    <%
>      ReservationListForm rlf = (ReservationListForm)
>        session.getAttribute("reservationListForm");
>      ReservationTimeslotManager rtm = rlf.getTimeslotManager();
>      ReservationTimeslot rt = rtm.getReservationTimeslot();
>      String startDateString = rt.getStartDateString();
>      ...
>    %>
> 
> 5. Can't access any other properties of 'reservationTimeslot' either.
> And if I try shortening the chain of nested properties...
> 
>    <bean:write name="reservationListForm" property="timeslotManager"/>
> 
> ...runs without error, but...
> 
>    <bean:write name="reservationListForm"
>      property="timeslotManager.reservationTimeslot"/>
> 
> ...again brings the "No getter method..." error.
> 
> 6. Same behavior if I move the app to OS X.
> 
> This is all amusing, of course, but I'd like to move on to other things. 
> Does it ring any bells? Any suggestions about other things I might try 
> looking at?
> 
> Thanks, Mark
> 
> ---------------------------------------------------------------------
> 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