Yep, that's pretty clear. SLF4JLocationAwareLog[1] doesn't implement
serializable. So, to fix, see my previous comment.

Eelco

[1]
http://www.slf4j.org/api/org/apache/commons/logging/impl/SLF4JLocationAwareLog.html



On 4/25/07, Bjön Limell <[EMAIL PROTECTED]> wrote:

here's the trace:

 ERROR org.apache.wicket.util.lang.Objects
 "Error serializing object class testpage.PollPage [object=[Page class =
testpage.PollPage, id = 1, version = 0]]"

org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:Unable
 to serialize class:
org.apache.commons.logging.impl.SLF4JLocationAwareLog
Field hierarchy is:
  1 [class=testpage.PollPage, path=1]
    private final org.apache.commons.logging.Log testpage.BasePage.log[class=
org.apache.commons.logging.impl.SLF4JLocationAwareLog] <----- field that
is not serializable
        at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:347)
        at org.apache.wicket.util.io.SerializableChecker.checkFields (
SerializableChecker.java:615)
        at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:538)
        at
org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(
SerializableChecker.java :683)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java
:322)
        at
org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(
IObjectStreamFactory.java:74)
        at java.io.ObjectOutputStream.writeObject (ObjectOutputStream.java
:322)
        at org.apache.wicket.util.lang.Objects.objectToByteArray(
Objects.java:1102)
        at org.apache.wicket.protocol.http.FilePageStore.serializePage(
FilePageStore.java:651)
        at org.apache.wicket.protocol.http.FilePageStore.access$900(
FilePageStore.java:49)
        at
org.apache.wicket.protocol.http.FilePageStore$PageSerializingThread.run(
FilePageStore.java:237)
        at java.lang.Thread.run (Thread.java:619)
Caused by: java.io.NotSerializableException:
org.apache.commons.logging.impl.SLF4JLocationAwareLog
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java
:1156)
        at java.io.ObjectOutputStream.defaultWriteFields (
ObjectOutputStream.java:1509)
        at java.io.ObjectOutputStream.writeSerialData(
ObjectOutputStream.java:1474)
        at java.io.ObjectOutputStream.writeOrdinaryObject(
ObjectOutputStream.java:1392)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java
:1150)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java
:326)
        at
org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride (
IObjectStreamFactory.java:66)
        ... 6 common frames omitted


Using jdk1.6.0_01

On 4/26/07, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
>
> What's the stack trace you get when you use normal serialization? It
> should point you to an offending field.
>
> If you only get it with JCL, there is probably something in JCL that
> isn't serializable. You should consider either making it a static variable,
> getting it only when you need it (don't hold a reference, which is probably
> quite inefficient), or store it as a transient field, and initiatlize it
> lazily (check on null) so that it won't be serialized. More work but safe.
> If you choose the latter, be sure to always do the null check, as
> serializaing/ deserializing will null the reference.
>
> Eelco
>
>
> On 4/25/07, Bjön Limell < [EMAIL PROTECTED]> wrote:
> >
> > Maybe I was a bit unclear.
> >
> > The problem only occurs when you're using jcl104-over-slf4j (JCL's Log
> > not slf4j's Logger).
> >
> > JCL104-over-slf4j just enables you to use old 'Log log =
> > LogFactory.getLog ()' with slf4j (without classloading issues etc)
> >
> > ps. Same problem with Objects.setObjectStreamFactory(...);
> >
> >
> > On 4/25/07, Justin Morgan < [EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Just a data point...I am using the Wicket 1.3 snapshot jars along
> > > with SLF4J with no problems; my pages log just fine.  The underlying 
logging
> > > implementation I'm using is the Log4J (v1.2) logging system.  So far
> > > I really like slf4j, BTW.
> > >
> > > - Justin
> > >
> > >
> > >
> > >  *"Bjön Limell" <[EMAIL PROTECTED]>*
> > > Sent by: [EMAIL PROTECTED]
> > >
> > > 04/25/2007 11:57 AM  Please respond to
> > > [email protected]
> > >
> > >   To
> > > [email protected]  cc
> > >
> > >  Subject
> > > Re: [Wicket-user] SLF4J and wicket
> > >
> > >
> > >
> > >
> > >
> > >
> > > btw, im using 1.3.0-incubating-SNAPSHOT
> > >
> > > On 4/25/07, Bjön Limell <[EMAIL PROTECTED]> wrote:
> > > > Sure!
> > > >
> > > > ERROR org.apache.wicket.util.lang.Objects
> > > >  "Error serializing object class test.page.SignInPage[object=[Page
> > > > class = test.page.SignInPage, id = 1, version = 0]]"
> > > > org.apache.wicket.util.io.WicketSerializeableException: No
> > > > Serializable constructor found for class
> > > > org.apache.commons.logging.impl.SLF4JLocationAwareLog
> > > > test.page.SignInPage->log
> > > > NOTE: if you feel Wicket is at fault with this exception, please
> > > > report to the mailing list. You can switch to JDK based
> > > serialization
> > > > by calling:
> > > org.apache.wicket.util.lang.Objects.setObjectStreamFactory(new
> > > > IObjectStreamFactory.DefaultObjectStreamFactory()) e.g. in the
> > > init
> > > > method of your application
> > > >         at org.apache.wicket.util.io.ClassStreamHandler.<init>(
> > > ClassStreamHandler.java:252)
> > > >         at org.apache.wicket.util.io.ClassStreamHandler.lookup(
> > > ClassStreamHandler.java:116)
> > > >         at
> > > org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride
> > > (WicketObjectOutputStream.java:752)
> > > >         at java.io.ObjectOutputStream.writeObject(
> > > ObjectOutputStream.java:322)
> > > >         at
> > > 
org.apache.wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField
> > > (ClassStreamHandler.java:862)
> > > >         at
> > > org.apache.wicket.util.io.ClassStreamHandler.writeFields(
> > > ClassStreamHandler.java:387)
> > > >         at
> > > org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride
> > > (WicketObjectOutputStream.java:779)
> > > >         at java.io.ObjectOutputStream.writeObject(
> > > ObjectOutputStream.java:322)
> > > >         at org.apache.wicket.util.lang.Objects.objectToByteArray(
> > > Objects.java:1102)
> > > >         at
> > > org.apache.wicket.protocol.http.FilePageStore.serializePage(
> > > FilePageStore.java:651)
> > > >         at
> > > org.apache.wicket.protocol.http.FilePageStore.access$900(
> > > FilePageStore.java:49)
> > > >         at
> > > org.apache.wicket.protocol.http.FilePageStore$PageSerializingThread.run
> > > (FilePageStore.java:237)
> > > >         at java.lang.Thread.run(Thread.java:619)
> > > >
> > > > ps. thanks for the SUPER quick response!! ;)
> > > >
> > > > On 4/25/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > > > > It might be a bug in our custom serialization. Could you please
> > > paste
> > > > > the full stack trace please?
> > > > >
> > > > > Eelco
> > > > >
> > > > > On 4/25/07, Bjön Limell <[EMAIL PROTECTED]> wrote:
> > > > > > Hi.
> > > > > >
> > > > > > Anyone had success with slf4j and wicket pages?
> > > > > >
> > > > > > Im getting serializeable exceptions with
> > > jcl104-over-slf4j-1.3.1.jar:
> > > > > >    org.apache.wicket.util.io.WicketSerializeableException: No
> > > > > > Serializable constructor found for class
> > > > > > org.apache.commons.logging.impl.SLF4JLocationAwareLog
> > > > > >
> > > > > > At the moment I dont need to cluster, but im not sure how its
> > > gonna be
> > > > > > later on...
> > > > > >
> > > > > >
> > > -------------------------------------------------------------------------
> > > > > > This SF.net email is sponsored by DB2 Express
> > > > > > Download DB2 Express C - the FREE version of DB2 express and
> > > take
> > > > > > control of your XML. No limits. Just data. Click to get it
> > > now.
> > > > > > http://sourceforge.net/powerbar/db2/
> > > > > > _______________________________________________
> > > > > > Wicket-user mailing list
> > > > > > [email protected]
> > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >
> > > > >
> > > > >
> > > -------------------------------------------------------------------------
> > > > > This SF.net email is sponsored by DB2 Express
> > > > > Download DB2 Express C - the FREE version of DB2 express and
> > > take
> > > > > control of your XML. No limits. Just data. Click to get it now.
> > > > > http://sourceforge.net/powerbar/db2/
> > > > > _______________________________________________
> > > > > Wicket-user mailing list
> > > > > [email protected]
> > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > >
> > >
> > >
> > > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > >
> > > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to