Werner,
Yes, I'm obtaining a Database connection to a HttpSession. Each HttpSession gets it's own Database connection. I'm getting this exception, but the data is stored in the database. I configured Tomcat to use Cookies for my website and I don't get the exception anymore.
What do you mean, with change the usage of Castor? How can I use the connection with Tomcat? Do you have an example?
regards,
markus
-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 8. Oktober 2004 21:34
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] NotSerializableException
Markus,
you get this exception because Database(Impl) simply isn't serializable, and imho shouldn't be either.
Can you just briefly explain why you are getting this exception ? Or even better, what's the problem you are trying to solve. It looks like you are binding a
Database instance (as obtained via JDO.getDatabase() to a HttpSession, correct ? If that's the case, I'd consider to change your usage of Castor, as
obtaining Database instances from JDO is not expensive at all (especially when using a connection pool with Tomcat).
Regards
Werner
--Original Message Text---
From: [EMAIL PROTECTED]
Date: Fri, 8 Oct 2004 18:59:09 +0200
NotSerializableException
HI,
I get an NotSerializable using castor within an EJB in Tomcat 4.1.27. Any Ideas why? What is the workaround?
thanks,
markus
IOException while loading persisted sessions: java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException:
org.exolab.castor.jdo.engine.DatabaseImpl
java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: org.exolab.castor.jdo.engine.DatabaseImpl
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:445)
at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1369)
at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:864)
at org.apache.catalina.session.StandardManager.load(StandardManager.java:440)
at org.apache.catalina.session.StandardManager.start(StandardManager.java:655)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3571)
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:2190)
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 java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe
dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify
the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev