You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sergey Olefir <so...@gmail.com> on 2010/03/08 13:41:51 UTC

Support for serialization debugging.

Hi,

what is the current 'proper' way to debug serialization issues in Wicket?

My web search led me to two things:
- Wicket contains SerializableChecker class whose explicit purpose is
to assist in tracking down serialization issues.
- At some point it seems that in development mode Wicket used to
serialize pages on each request (so that you'll catch your
serialization issues early).

However right now it seems that Wicket is using
SecondLevelCacheSessionStore for serialization purposes -- and the
implementation does not make use of SerializableChecker.

Also current Wicket apparently does not serialize pages on each
request in development mode (at least not by default).


So with the current Wicket is there a way to force page serialization
on each request and to enable serialization debugging via
SerializableChecker or something else?

I'm asking because to track down my serialization issue recently I had
to basically copy-paste SecondLevelCacheSessionStore and manually add
SerializableChecker invocation to track it down. Plus the error only
became apparent when Tomcat was shutdown with 'proper' sessions still
in memory.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Support for serialization debugging.

Posted by Sergey Olefir <so...@gmail.com>.
Thanks for the reply, Igor.

Indeed it was my own error -- there was a misconfiguration in our log4j
config which led to me simply not seeing error messages generated by Wicket
when serialization failed. It's only when I was shutting down the server,
the error message had enough severity to be seen.

On the other hand I found out a tidbit of information that I wanted to share
with the community :)

Under current Sun JDK, if you set JVM option:
-Dsun.io.serialization.extendedDebugInfo=true

then any NotSerializableExceptions will include detailed debug information
showing where the problem has occurred. This might be useful in cases where
SerializationChecker is not immediately available.



igor.vaynberg wrote:
> 
> seems like it should be running.
> 
> AbstractPageStore:203 serializes the page by calling
> Objects.objectToByteArray() which by default uses
> DefaultObjectStreamFactory which in turn runs your object through the
> SerializableChecker if an exception occurs, see
> IObjectStreamFactory:125
> 
> so unless you installed your own objectoutputstreamfactory or if you
> are running on a non-sun jdk (serializable checker hacks stuff using
> reflection) you should be using it...
> 
> -igor
> 

-- 
View this message in context: http://old.nabble.com/Support-for-serialization-debugging.-tp27820726p27851166.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Support for serialization debugging.

Posted by Igor Vaynberg <ig...@gmail.com>.
seems like it should be running.

AbstractPageStore:203 serializes the page by calling
Objects.objectToByteArray() which by default uses
DefaultObjectStreamFactory which in turn runs your object through the
SerializableChecker if an exception occurs, see
IObjectStreamFactory:125

so unless you installed your own objectoutputstreamfactory or if you
are running on a non-sun jdk (serializable checker hacks stuff using
reflection) you should be using it...

-igor


On Mon, Mar 8, 2010 at 4:41 AM, Sergey Olefir <so...@gmail.com> wrote:
> Hi,
>
> what is the current 'proper' way to debug serialization issues in Wicket?
>
> My web search led me to two things:
> - Wicket contains SerializableChecker class whose explicit purpose is
> to assist in tracking down serialization issues.
> - At some point it seems that in development mode Wicket used to
> serialize pages on each request (so that you'll catch your
> serialization issues early).
>
> However right now it seems that Wicket is using
> SecondLevelCacheSessionStore for serialization purposes -- and the
> implementation does not make use of SerializableChecker.
>
> Also current Wicket apparently does not serialize pages on each
> request in development mode (at least not by default).
>
>
> So with the current Wicket is there a way to force page serialization
> on each request and to enable serialization debugging via
> SerializableChecker or something else?
>
> I'm asking because to track down my serialization issue recently I had
> to basically copy-paste SecondLevelCacheSessionStore and manually add
> SerializableChecker invocation to track it down. Plus the error only
> became apparent when Tomcat was shutdown with 'proper' sessions still
> in memory.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org