There is a DEBUG level logger in wicket.protocol.http.HttpSessionStore
that tries to serialize any attribute that is set. The development
version - soon 1.2.1 - has a fix so that it doesn't depend on the log
level, but instead on an application setting:

if (Application.get().getDebugSettings().getSerializeSessionAttributes())
{
        String valueTypeName = (value != null ? value.getClass().getName() : 
"null");
        try
        {
                final ByteArrayOutputStream out = new ByteArrayOutputStream();
                new ObjectOutputStream(out).writeObject(value);
                log.debug("Stored attribute " + name + "{ " + valueTypeName + 
"} with size: "
                                + Bytes.bytes(out.size()));
        }
        catch (Exception e)
        {
                throw new WicketRuntimeException(
                                "Internal error cloning object. Make sure all 
dependent objects
implement Serializable. Class: "
                                                + valueTypeName, e);
        }
}


The reason we deliver that functionality is to help you ensure you
application can function properly in a cluster, using session
replication. There are many strategies however, including a different
approach than normal serializing, but serializing is the default, and
is something you should use when you use a backing httpsession
(Wicket's default) anyway.

Anything that may end up in the session store, components (and their
state), models, etc, should be serializable. If you want to pursue a
different strategy, implement an ISessionStore that does this.

Hope this helps,

Eelco



On 7/18/06, Steve Moitozo <[EMAIL PROTECTED]> wrote:
> I just changed the log4j log level for wicket to DEBUG and now my
> application craps out with the following error:
>
> Internal error cloning object. Make sure all dependent objects implement
> Serializable. Class: mystuff.wicketapp.MyWebSession
>
> Am I to assume that the entire hierarchy of class properties contained
> within MyWebSession must implement Serializable? If so can you offer any
> alternatives?
>
> Why does my app still work when the log level is set higher? I guess the
> real question is does it really work? I haven't tested clustering and
> state replication. I would assume that the above error would cause state
> replication to fail. True?
>
>
> -S2
> --
> Steve Moitozo II
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to