make sure your authenticate message calls session.dirty() or session.bind() so that the session itself is persisted.
-igor On Fri, Mar 18, 2011 at 8:27 AM, Chris Merrill <ch...@webperformance.com> wrote: > I might have answered my question. I did some refactoring and took out some > code from my > base page class that was calling getApplication(). I didn't need it anyway, > and now I am > not seeing the serialization exception that references my application class. > It is not clear > to me how this caused the problem, as I was not storing the reference - just > calling into > an application method from my page constructor. :( > > > However, I'm now faced with another problem - which is that my session does > not appear > to be serializing the member fields. My session class, which extends > AuthenticatedWebSession > and implements serializable (and defines serialVersionUID) has one member > variable which > is a string. I set that field when the user authenticates, via > AuthenticatedWebSession. > authenticate() but when the next page goes to get the field, it is null. My > authenticate() > method is returning true to indicate a successful authentication, but other > pages still see > the session as not authenticated : AuthenticatedWebSession.isSignedIn() == > false > So it doesn't appear to be just my members, but AuthenticatedWebSession as > well. > > Note that all of this works fine in the GAE development environment (i.e. > locally) but > not when deployed to GAE. > > Any ideas would be greatly appreciated! > Chris > > > > On 3/18/2011 10:12 AM, Chris Merrill wrote: >> I'm trying to get a Wicket app working in GAE. I had the basics working. >> I've read >> and followed: >> >> http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/ >> so I have enabled sessions, turned off resource polling and overridden >> newSessionStore() >> to return a new HttpSessionStore. I'm deploying in Deployment mode. >> >> I had some basic pages working, but now I am getting a serialization error >> when the session >> is serialized - the error is that my application class is not serializable. >> I was under >> the impression that the Application should not be serialized into the >> session, so I >> have proceeded to look for any places I have inadvertantly referenced the >> application >> in something in the session object. That was easy, because my session, >> which extends >> AuthenticatedWebSession, only has one member - a String. So next I searched >> for all >> usages of my Application class - and found none that are storing a reference >> in a >> member variable. I was looking specifically in pages, but my search covered >> all my >> classes. Are there other things I might do to cause an indirect reference >> to the >> Application in a page? Or am I barking up the wrong tree? >> >> I've also reviewed the GAE threads here, as well as this: >> >> http://thoughts.inphina.com/2010/10/20/managing-wicket-serialization-problem-on-google-app-engine/ >> but that doesn't seem to be the same serialization problem I'm having >> (though it appears >> I'll likely encounter it later). >> >> I've gone down a number of paths, but now feel like I'm just flailing around. >> >> If anyone has any ideas, I'd appreciate hearing them! >> >> TIA >> Chris >> > > > -- > ------------------------------------------------------------------------ - > Chris Merrill | Web Performance, Inc. > ch...@webperformance.com | http://webperformance.com > 919-433-1762 | 919-845-7601 > > Web Performance: Website Load Testing Software & Services > ------------------------------------------------------------------------ - > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org