You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Bart Molenkamp <b....@bizzdesign.nl> on 2007/08/28 15:25:11 UTC

Versioning not working when a page can't be serialized?

Hi,

I tried to apply versioning to my pages to support browser back
and forward. This doesn't seem to work when the page can't be
serialized to disk, when going back with the browser's back button
I get PageExpiredExceptions. This is because the serialized page
can't be found (because serialization failed in the first place).

Serialization failed because not everything on my page implemented
java.io.Serializable (my fault). The serialization throws an
exception, but it is swallowed at
org.apache.wicket.util.lang.Objects, line 1113.

Why is this exception swallowed? Isn't it a good idea to rethrow it?
It took me a few hours to find out why versioning wasn't working...

Thanks,
Bart.

RE: Versioning not working when a page can't be serialized?

Posted by Bart Molenkamp <b....@bizzdesign.nl>.
With logging turned on, I do see the stacktrace.
Thanks!

Bart.

> -----Oorspronkelijk bericht-----
> Van: Bart Molenkamp
> Verzonden: dinsdag 28 augustus 2007 15:57
> Aan: dev@wicket.apache.org
> Onderwerp: RE: Versioning not working when a page can't be serialized?
>
>
>
> > -----Oorspronkelijk bericht-----
> > Van: Matej Knopp [mailto:matej.knopp@gmail.com]
> > Verzonden: dinsdag 28 augustus 2007 15:35
> > Aan: dev@wicket.apache.org
> > Onderwerp: Re: Versioning not working when a page can't be
> serialized?
> >
> > Depends on what wicket version you are using. As for 1.3, the
> > page indeed
> > must be serialized. There is no way around it.
> > The exception shouldn't have been swallowed though. Are you
> > sure it wasn't
> > in your logs?
>
> I had no logging to System.out (not for wicket), my fault.
> I guess it was logged as I did see the log statement in the
> catch block.
>
> Thanks,
>
> Bart.
>

RE: Versioning not working when a page can't be serialized?

Posted by Bart Molenkamp <b....@bizzdesign.nl>.

> -----Oorspronkelijk bericht-----
> Van: Matej Knopp [mailto:matej.knopp@gmail.com]
> Verzonden: dinsdag 28 augustus 2007 15:35
> Aan: dev@wicket.apache.org
> Onderwerp: Re: Versioning not working when a page can't be serialized?
>
> Depends on what wicket version you are using. As for 1.3, the
> page indeed
> must be serialized. There is no way around it.
> The exception shouldn't have been swallowed though. Are you
> sure it wasn't
> in your logs?

I had no logging to System.out (not for wicket), my fault.
I guess it was logged as I did see the log statement in the catch block.

Thanks,

Bart.

Re: Versioning not working when a page can't be serialized?

Posted by Matej Knopp <ma...@gmail.com>.
Depends on what wicket version you are using. As for 1.3, the page indeed
must be serialized. There is no way around it.
The exception shouldn't have been swallowed though. Are you sure it wasn't
in your logs?

Prior beta 3, default page store is FilePageStore which serializes page in
separate thread, so there is no way to display an error page. But still, the
exception should have been in your log.

-Matej

On 8/28/07, Bart Molenkamp <b....@bizzdesign.nl> wrote:
>
> Hi,
>
> I tried to apply versioning to my pages to support browser back
> and forward. This doesn't seem to work when the page can't be
> serialized to disk, when going back with the browser's back button
> I get PageExpiredExceptions. This is because the serialized page
> can't be found (because serialization failed in the first place).
>
> Serialization failed because not everything on my page implemented
> java.io.Serializable (my fault). The serialization throws an
> exception, but it is swallowed at
> org.apache.wicket.util.lang.Objects, line 1113.
>
> Why is this exception swallowed? Isn't it a good idea to rethrow it?
> It took me a few hours to find out why versioning wasn't working...
>
> Thanks,
> Bart.
>

Re: Versioning not working when a page can't be serialized?

Posted by Martijn Dashorst <ma...@gmail.com>.
The exception is not propagated because the request is already
dispatched to the user and nothing can be shown. You *really* need to
take a look at the log files during development.

Logging the exception is the best effort we can do.

Martijn

On 8/28/07, Bart Molenkamp <b....@bizzdesign.nl> wrote:
> Hi,
>
> I tried to apply versioning to my pages to support browser back
> and forward. This doesn't seem to work when the page can't be
> serialized to disk, when going back with the browser's back button
> I get PageExpiredExceptions. This is because the serialized page
> can't be found (because serialization failed in the first place).
>
> Serialization failed because not everything on my page implemented
> java.io.Serializable (my fault). The serialization throws an
> exception, but it is swallowed at
> org.apache.wicket.util.lang.Objects, line 1113.
>
> Why is this exception swallowed? Isn't it a good idea to rethrow it?
> It took me a few hours to find out why versioning wasn't working...
>
> Thanks,
> Bart.
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/