problem with serialization

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
carolingian
Posts: 2
Joined: Tue Jul 08, 2003 8:44 am
Location: hangzhou china
Contact:

problem with serialization

Post by carolingian » Tue Jul 08, 2003 8:54 am

First, after I read the api doc of jfreechart, I found that JFreeChart implements java.io.Serializable,but when I use ObjectOutputStream.writeObject(Object) to write the JFreeChart, the program stopped with java.io.NotSerializableException.
so I read the source, to my surprise, it does not implements the java.io.Serializable.
Is it a bug of API doc, or the source I read was too old?
by the way,does any Dataset Object implements java.io.Serializable?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue Jul 08, 2003 3:26 pm

Most classes are Serializable in the latest release. The code is fairly new though, so I'm expecting some bugs to be found.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

wiesi
Posts: 27
Joined: Thu Aug 21, 2003 4:49 pm

Post by wiesi » Thu Aug 21, 2003 4:50 pm

Hi,

not only the object you write needs to be serializable, all references in the object need to be, too.

Regards,
Wiesi

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu Aug 21, 2003 5:43 pm

Some more improvements have been made for the 0.9.12 release. If anyone wants to help out, some additional JUnit tests to confirm that the serialization is really working would be very helpful.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked