Howdy ya'll, I posted this Friday but no one's biting so far... Has anyone had problems with session-scoped ActionForms being null after (de)Serialization (context restart). I have confirmed that running myForm.reset(...) on my ActionForm after restart throws a NullPointerException via debugging filter I've got set up.
> As soon as I try to request either action that utilizes the ActionForm, I > get problems. If I request the forward action (which just forwards to the > jsp with form tags), I get this: > > ----begin log > javax.servlet.ServletException: Exception thrown by getter for property > applicationDateMin of bean org.apache.struts.taglib.html.BEAN > ----end log > > applictionDateMin is the FIRST form element in my jsp. Suspicious? > > If I request the action that processes the submitted form, I get this: > > ----begin log > java.lang.NullPointerException > at com.amfllc.web.forms.SearchPipelineActionForm.reset(Unknown > Source) > ----end log Please see below for further details. Thank you for any help. -Sasha On 8/22/03 17:54, "Sasha Borodin" <[EMAIL PROTECTED]> wrote: > I've been beating my head against this for a couple of days now, if someone > can help me out, that would really make my weekend :-) > > I am having a problem with an ActionForm after restarting the context. > Here's some details: > > 1. I have a jsp with struts form tags. > 2. This form has an ActionForm associated with it. > 3. One forward action that takes you to the jsp. > 4. One custom action that processes the submission of this form (has action > form declared in action-mapping in struts-config.xml) > > If I have a fresh session, and play around, the ActionForm is bound to the > session as an attribute. Everything works fine. > > If I reload the context, everything appears to get Serialized successfully > (I get no exceptions anywhere, there's a SESSIONS.ser file created in the > work dir). If I check the session after reload, my ActionForm is once again > listed as one of the attributes. > > -BUT- > > As soon as I try to request either action that utilizes the ActionForm, I > get problems. If I request the forward action (which just forwards to the > jsp with form tags), I get this: > > ----begin log > javax.servlet.ServletException: Exception thrown by getter for property > applicationDateMin of bean org.apache.struts.taglib.html.BEAN > ----end log > > applictionDateMin is the FIRST form element in my jsp. Suspicious? > > If I request the action that processes the submitted form, I get this: > > ----begin log > java.lang.NullPointerException > at com.amfllc.web.forms.SearchPipelineActionForm.reset(Unknown > Source) > ----end log > > To a newbie like me, it looks like Struts wants to use the ActionForm bound > to the session, but it's null after context restart for some reason. > > I've got a debugging filter set up that does some logging of request and > session properties - that's how I know that the form is there in session. > I've even gone as far as to check it for being null - it appears not to be > == null. I've marked all the usual suspects transient (logger, etc.). > > What am I missing here? Thanks so much for any help. > > -Sasha > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

