tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Lucia" <timlu...@yahoo.com>
Subject RE: Why can java.io.NotSerializableException occur?
Date Wed, 08 Nov 2006 11:58:57 GMT
If all your session objects (beans) implement java.io.Serializable, then
Tomcat can persist sessions across shutdowns and restarts.  If they do not,
then session cannot survive a shutdown/restart.  The message is otherwise
harmless.

If you want to cluster Tomcats to serve your app, you really should
implement this interface, otherwise Tomcat cannot ship the sessions between
the cluster members.

As a cheap and dirty trick, you can write a session listener that checks
when objects are added and logs a message with the class name for objects
which do not conform.

Ciao,
Tim


-----Original Message-----
From: starki78 [mailto:starki78@libero.it] 
Sent: Wednesday, November 08, 2006 2:21 AM
To: users
Subject: Re: Why can java.io.NotSerializableException occur?

THank you, I don't know
I just can say that this error occured the first time:

Has someone seen it before?
Nice greetings Starki

2006-11-07 11:25:49 StandardManager[/pss] IOException while loading
persisted sessions: java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: com.production.pss.bde.dwh.Deviance
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: com.production.pss.bde.dwh.Deviance
	at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
	at java.util.ArrayList.readObject(ArrayList.java:547)
	at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
	at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)









---------- Initial Header -----------

>From      : "Juanjo Cuadrado" jjcuadrado@gmail.com
To          : "Tomcat Users List" users@tomcat.apache.org
Cc          : 
Date      : Tue, 7 Nov 2006 12:01:56 +0100
Subject : Re: Why can java.io.NotSerializableException occur?







> Hi,
> 
>     maybe the problem is that tomcat is trying to do anything with the
> session and it is trying to write you object for sesion persistence...
> 
> 
> 2006/11/7, starki78 <starki78@libero.it>:
> >
> > We have a crash at tomcat 4.
> > The thing I don't understand is the fact that
> > the class causing this error has no default constructor and
> > does not implement serializable.
> >
> > So why can this error occur?
> >
> > THANKS A LOT
> >
> >
> > 2006-11-07 11:25:49 StandardManager[/pss] IOException while loading
persi=
> > sted sessions: java.io.WriteAbortedException: writing aborted;
java.io.No=
> > tSerializableException: com.struts.statistics.Deviation
> >
> > .Measures
> > java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableEx=
> > ception: com.struts.statistics.Deviation
> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
> > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
> > at java.util.ArrayList.readObject(ArrayList.java:547)
> > at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
> > at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces=
> > sorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838=
> > )
> > at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)=
> >
> > at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1=
> > 646)
> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
> > at
org.apache.catalina.session.StandardSession.readObject(StandardSessio=
> > n.java:1369)
> > at
org.apache.catalina.session.StandardSession.readObjectData(StandardSe=
> > ssion.java:864)
> > at
org.apache.catalina.session.StandardManager.load(StandardManager.java=
> > :440)
> > at
org.apache.catalina.session.StandardManager.start(StandardManager.jav=
> > a:655)
> > at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3=
> > 585)
> > at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)=
> >
> > at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
> > at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)=
> >
> > at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363=
> > )
> > at
org.apache.catalina.core.StandardService.start(StandardService.java:4=
> > 97)
> > at
org.apache.catalina.core.StandardServer.start(StandardServer.java:219=
> > 0)
> > at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.jav=
> > a:273)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.=
> > java:39)
> > at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces=
> > sorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.j=
> > ava:245)
> > at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.ja=
> > va:307)=0A
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> 


------------------------------------------------------
Scopri il nuovo MOTOROLA K1, il cellulare con superficie frontale a
specchio. Se sarai fortunato potrai anche vincerne uno! Clicca e vinci !
http://click.libero.it/motorola8nov



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message