Hi
I updated from vectmath to vectmath2 and now I cannot serialize Point3f, using java serialization.
An exception is thrown when I try to read the saved object.
Here is the exception (SerializationUtils just does loadObject() ):
Exception in thread "main" java.lang.RuntimeException: Error al deserializar por java el archivo temp
at org.openmali.SerializationUtils.loadObject(SerializationUtils.java:31)
at org.openmali.TestSerializePoint3f.main(TestSerializePoint3f.java:17)
Caused by: java.lang.RuntimeException: Error al deserializar por java
at org.openmali.SerializationUtils.loadObject(SerializationUtils.java:41)
at org.openmali.SerializationUtils.loadObject(SerializationUtils.java:28)
... 1 more
Caused by: java.io.InvalidClassException: org.openmali.vecmath2.Point3f; org.openmali.vecmath2.Point3f; no valid constructor
at java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:713)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1733)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.openmali.SerializationUtils.loadObject(SerializationUtils.java:38)
... 2 more
Caused by: java.io.InvalidClassException: org.openmali.vecmath2.Point3f; no valid constructor
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:471)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.openmali.SerializationUtils.saveObject(SerializationUtils.java:19)
at org.openmali.TestSerializePoint3f.main(TestSerializePoint3f.java:15)
The java API says that InvalidClassException is thrown when:
1) The serial version of the class does not match that of the class descriptor read from the stream
2)The class contains unknown datatypes
3)The class does not have an accessible no-arg constructor
It cannot be 3, beacuse it already has a no-arg constructor