Subject java.io.NotSerializableException
Author Juan Pedro López Sáez
Hi everybody,

I'm experiencing a strange and very occasional exception.

It happens very hardly ever after compiling changes and reloading some
JSP beans into Tomcat.

The solution is recompile the same code, without adding any new change,
and reload it again.

Has anybody experienced this previously?

I attach the Exception snapshot.

Thank you in advance.

Juan Pedro.

2003-05-23 13:17:13 WebappLoader[/wasp]: Deploying class repositories to
work directory C:\Tomcat 4.1\work\Standalone\localhost\wasp
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy class files
/WEB-INF/classes to C:\Tomcat 4.1\webapps\wasp\build\WEB-INF\classes
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/commons-beanutils-1.3.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\commons-beanutils-1.3.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/firebirdjmx.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\firebirdjmx.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/firebirdsql-test.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\firebirdsql-test.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/firebirdsql.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\firebirdsql.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/jaas.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\jaas.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/junit-3.8.1.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\junit-3.8.1.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/log4j-1.2.7.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\log4j-1.2.7.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/mini-concurrent.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\mini-concurrent.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/mini-j2ee.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\mini-j2ee.jar
2003-05-23 13:17:13 WebappLoader[/wasp]: Deploy JAR
/WEB-INF/lib/servletapi-2.3.jar to C:\Tomcat
4.1\webapps\wasp\build\WEB-INF\lib\servletapi-2.3.jar
2003-05-23 13:17:13 StandardManager[/wasp]: Seeding random number
generator class java.security.SecureRandom
2003-05-23 13:17:13 StandardManager[/wasp]: Seeding of random number
generator has been completed
2003-05-23 13:17:14 StandardManager[/wasp] IOException while loading
persisted sessions: java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: org.firebirdsql.jdbc.FBConnection
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: org.firebirdsql.jdbc.FBConnection
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1357)
at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:852)
at
org.apache.catalina.session.StandardManager.load(StandardManager.java:411)
at
org.apache.catalina.session.StandardManager.start(StandardManager.java:626)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3570)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.io.NotSerializableException:
org.firebirdsql.jdbc.FBConnection
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1427)
at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:869)
at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:507)
at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:662)
at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:3665)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1036)
at
org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.java:420)
at org.apache.catalina.core.StandardHost.remove(StandardHost.java:852)
at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:919)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:899)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:370)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1221)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1233)
at
org.apache.catalina.core.StandardService.stop(StandardService.java:554)
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2224)
at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:624)

2003-05-23 13:17:14 StandardManager[/wasp] Exception loading sessions
from persistent storage
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: org.firebirdsql.jdbc.FBConnection
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1357)
at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:852)
at
org.apache.catalina.session.StandardManager.load(StandardManager.java:411)
at
org.apache.catalina.session.StandardManager.start(StandardManager.java:626)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3570)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.io.NotSerializableException:
org.firebirdsql.jdbc.FBConnection
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1427)
at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:869)
at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:507)
at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:662)
at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:3665)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1036)
at
org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.java:420)
at org.apache.catalina.core.StandardHost.remove(StandardHost.java:852)
at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:919)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:899)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:370)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1221)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1233)
at
org.apache.catalina.core.StandardService.stop(StandardService.java:554)
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2224)
at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:624)

2003-05-23 13:17:14 StandardWrapper[/wasp:default]: Loading container
servlet default
2003-05-23 13:17:14 StandardWrapper[/wasp:invoker]: Loading container
servlet invoker


java.io.NotSerializableException: org.firebirdsql.jdbc.FBConnection