Hey guys,

I am trying to run the example fortune that comes with spring 2.5 distribution. I really like all fortunes sayings, all of them, but!!

My first run resulted in problem that was caused by groovy-1.0.jar ( comes by default with distribution). This actually occured when I was trying to get to the home page ( home.htm ).
Once I have download the groovy-1.0-jsr-04.jar ( used in build.xml) and modified the reference ( in build.xml ) to the correct version of the
log4j-1.2.14.jar
I was able to see the home page.

Then I got another problem (which is really weird) when I tried to get my fortune ( clicked on Get your fortune! )
This is it:

org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: Property 'fortune' not found on type $Proxy18
org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:163)
org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:239)
org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1145)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:882)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:795)
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:476)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:431)
javax.servlet.http.HttpServlet.service(HttpServlet .java:690)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)

root cause

javax.el.PropertyNotFoundException: Property 'fortune' not found on type $Proxy18
javax.el.BeanELResolver$BeanProperties.get(BeanELR esolver.java:193)
javax.el.BeanELResolver$BeanProperties.access$400( BeanELResolver.java:170)
javax.el.BeanELResolver.property(BeanELResolver.ja va:279)
javax.el.BeanELResolver.getValue(BeanELResolver.ja va:60)
javax.el.CompositeELResolver.getValue(CompositeELR esolver.java:53)
org.apache.el.parser.AstValue.getValue(AstValue.ja va:97)
org.apache.el.ValueExpressionImpl.getValue(ValueEx pressionImpl.java:186)
org.apache.jasper.runtime.PageContextImpl.propriet aryEvaluate(PageContextImpl.java:923)
org.apache.jsp.WEB_002dINF.jsp.tell_jsp._jspx_meth _c_005fout_005f0(tell_jsp.java:235)
org.apache.jsp.WEB_002dINF.jsp.tell_jsp._jspServic e(tell_jsp.java:112)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:163)
org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:239)
org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1145)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:882)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:795)
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:476)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:431)
javax.servlet.http.HttpServlet.service(HttpServlet .java:690)
javax.servlet.http.HttpServlet.service(HttpServlet
.java:803)

I was persistent enough to go through the source code and I found out that
$Proxy18 is JDK proxy
.

1. the tellFortune() does populate the fortune.
2. Going through the render() method of the DispatcherServlet...
Map model does have the fortune with both properties ( fortune and source ) properly set.
3. going onto exposeModelAsRequestAttributes()..
request.setAttribute(modelName, modelValue);
is setting the model as the request attribute.

4. going into prepareForRendering()...
requestToExpose
does have the
Fortune
object.

5. going into exposeForwardRequestAttributes()..->
WebUtils.exposeForwardRequestAttributes

6. once I go through the rd.forward(requestToExpose, response);
I get the error I showed.

How come $Proxy18 does not have the fortune property ??
Thanks for any help or suggestion.