As Richard says, don't store your request in the session, not a good idea.
Richard Mixon (qwest) wrote:
CoyoteRequestFacade is the first element in the stack trace - it is not the session stored object that is causing the NotSerializableException.
As I said in my prior posting, to resolve this issue you need to:
1) Identify each object that you are explicitly storing in the session and make sure it directly or indirectly (through inheritance) specified that it implements Serializable.
2) Follow the chain from each session object to other objects that it references and make sure they are ALL marked as serializable (again - either directly or indirectly)>
That will fix your problem. These issues often do not come up until either you: 1. Try and use session replication. 2. Try to persist sessions to a datastore and access from a cluster. 3. Try to persist sessions across a restart of Tomcat.
Also, please just reply to the list - not to the list and to the poster.
HTH - Richard
Sng Wee Jim wrote:
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13But the stacktrace says
java.io.NotSerializableException: org.apache.coyote.tomcat5.CoyoteRequestFacade at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) at
************************************************************************32) at
Since CoyoteRequestFacade is a tomcat class, I assume it has to be fixed by the tomcat team. Unless the actual object that is not Serializable not CoyoteRequestFacade is available somewhere else...
- Jim
-----Original Message----- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 11:13 PM To: Tomcat Users List Subject: RE: Tomcat clustering and NotSerializableException
As Matt said its probably your applications objects. When we switched to clustering I was surprised at how many of my session objects I needed to add serializable to. But it was easy work and quickl done.
HTH - Richard
Dale, Matt wrote:
I would guess that this means you have an object in your session that does not implement the serializable interface.
Ta Matt
-----Original Message----- From: Sng Wee Jim [mailto:[EMAIL PROTECTED] Sent: 28 February 2005 09:21 To: tomcat-user@jakarta.apache.org Subject: Tomcat clustering and NotSerializableException
Hi,
I am using Tomcat 5.0.28 on MS Win2k server.
After I have uncommented the "Cluster" element in server.xml, I get the following exceptions on the tomcat console for some actions that are using displaytag.
Is it a tomcat bug, since org.apache.coyote.tomcat5.CoyoteRequestFacade is involved?
(DeltaManager.java:813)- Unable to serialize delta request
java.io.NotSerializableException: org.apache.coyote.tomcat5.CoyoteRequestFacade
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
1332)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:13
04)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
a:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at org.apache.catalina.cluster.session.DeltaRequest$AttributeInfo.writeE
xternal(DeltaRequest.java:300)
at org.apache.catalina.cluster.session.DeltaRequest.writeExternal(DeltaR
equest.java:217)
at org.apache.catalina.cluster.session.DeltaManager.unloadDeltaRequest(D
eltaManager.java:393)
at org.apache.catalina.cluster.session.DeltaManager.requestCompleted(Del
taManager.java:782)
at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationVa
lve.java:203)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja
va:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:683)
at java.lang.Thread.run(Thread.java:534)
- Jim
************************************************************************The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized. If you are not an intended recipient, please notify the sender of this email
immediately. You should not copy, use or disseminate the
information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco.
http://www.capco.com/
************************************************************************
The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized. If you are not an intended recipient, please notify the sender of this email immediately. You should not copy, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco.
http://www.capco.com/
************************************************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]