Logger, conceptually, should not be Serializable. You can mark the Logger fields in those dataObjects as transient, but then when the session reactivates the field would be null; you'll have to write logic to handle the session activating to (re)obtain the Logger instance. This can be done with the javax.servlet.http.HttpSessionActivationListener interface.
HTH |-----Original Message----- |From: Denis McCarthy [mailto:[EMAIL PROTECTED]] |Sent: Friday, August 30, 2002 10:43 AM |To: Log4J Users List |Subject: NotSerializableException using log4j | | |Hi there, |I'm using log4j in some dataObjects that are stored in |each weblogic session |that a user opens. When the server attempts to serialize |the dataObjects in |the session, the following error occurs (presumably |because Logger is not |serializable) |<Error> <HTTP Session> <Could not deserialize session data |java.io.NotSerializableException: org.apache.log4j.Logger | at |java.io.ObjectOutputStream.outputObject(ObjectOutputStream. |java:1148) | at |java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366) | at |java.io.ObjectOutputStream.outputClassFields(ObjectOutputSt |ream.java:1827 | . | . | . | |Is there a workaround for this or do I have to take log4j out of my |dataObjects? Thanks |Denis McCarthy | | | | |-- |To unsubscribe, e-mail: |<mailto:[EMAIL PROTECTED]> |For additional commands, e-mail: |<mailto:[EMAIL PROTECTED]> | -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>