[Opensource] Controller and FormCache Legacy failure
Peter A. Pilgrim
peterp at xenonsoft.demon.co.uk
Tue Dec 24 18:24:34 PST 2002
I got a strange message in Controller.java:1286
if (finalErrors != null) {
if (finalErrors.getErrorCount() > 0) {
String errorState = nextState.getErrorState();
if (errorState != null) {
==> cr.setFormCache(); //Is this really needed?
transition(errorState, myRequest, cr);
return cr;
}
}
}
It claims that it cannot find the action form when in fact it does or should
exist in the HttpSession? I think it has something to do with "formCache"?
Is any body actually using the form cache. I think this is legacy from
Expresso 2 before the Struts Integration. Any one who using the form cache
should be using action forms stored in the session scope instead.
When I look in the ControllerResponse.java:932 at the error code.
DefaultForm myForm = (DefaultForm) getRequest().getSession().getAttribute(
formKey);
if (myForm == null) {
throw new ControllerException("No ActionForm found for key '" +
formKey + "' in session.");
}
getRequest() returns a ControllerRequest object
getSession() returns a PersistentSession object
The question is does `PersistentSession' equal the `HttpSession' object?
If not then it explains why the code is broken. I looked around various
source code `ServletControllerRequest' and `HTTPPersistentSession' is
created and stored. I am clueless. Unfortunately I have never
used formcaching so I do not want to fix this bug with my limited knowledge
expresso at xenonsoft.demon.co.uk wrote:
> Error:
> A com.jcorporate.expresso.core.controller.ControllerException Error occurred at 2002-12-25 01:42:14 in database/context 'default' to user 'Admin'
> The requested URL was '/expresso/eforum/Browse.do'
> No ActionForm found for key 'browseForm' in session.com.jcorporate.expresso.core.controller.ControllerException: No ActionForm found for key 'browseForm' in session.
> at com.jcorporate.expresso.core.controller.ControllerResponse.getDefaultForm(ControllerResponse.java:932)
> at com.jcorporate.expresso.core.controller.ControllerResponse.setFormCache(ControllerResponse.java:908)
> at com.jcorporate.expresso.core.controller.Controller.newState(Controller.java:1286)
> at com.jcorporate.expresso.core.controller.Controller.perform(Controller.java:1641)
> at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
> at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
--////--
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
> at java.lang.Thread.run(Thread.java:484)
>
>
> From Server:xenonace, Database/context:default (MYSQL 3.23.37 Database)
--
Peter Pilgrim
ServerSide Java Specialist
My on-line resume and for interview videos about myself, J2EE
Open Source, Struts and Expresso.
||
\\===> `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''
More information about the Opensource
mailing list