Here was my response to your original post: Serialization gets tricky. You must be very careful about all of the class level fields/objects you use. They must all be serializable and each object that those objects use or refer to must be serializable. Instead of using class level fields, wherever possible, pass objects around as parameters to your methods and constructors. This would include class level fields/objects in the Session object too since obviously that gets serialized.
I had a situation similar to yours where a class that is used by the JDBC driver was not serializable. To make a long story short, I was using a class level field that down the chain eventually ended up being mapped to the database and thus utilizing the jdbc driver's class. It took me quite a while to find this one :) I did not really need that field/object at the class level. When I removed it and reworked the code a bit, the problem went away. After I found it, I was wondering why I used this at the class level anyway. 2010/2/26 björn liffers <[email protected]> > hello, > i´ve got a problem with serialization. > > my application is connected to a mysql-db and every class of mine > implements serializable. > but still there are exceptions telling me that java.lang.Object isn´t > serializable... > > <quote> > org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: > Unable to serialize class: java.lang.Object > > private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap > [class=java.util.HashMap] > private java.util.Map > com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] > [class=java.lang.Object] <----- field that is not serializable > </quote> > > is there a possibility to deactivate serialization? > or how shall i solve this problem? > > kind regards ans many thanks to those who can help me out of the > serialization-jungle (never serialized anything before and i am relatively > new to wicket with my very first real wicket-project) > > > > > Tolle Dekolletés oder scharfe Tatoos? Vote jetzt ... oder mach selbst mit > und zeige Deine Schokoladenseite > bei Topp oder Hopp von Arcor: http://www.arcor.de/rd/footer.toh > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
