Hi
I have a java class serialized using kryo-shaded 4.0.1
class definition :
class A{
private int c1;
private Map<Integer, String> c2;
}
After serialization when I deserialized its fine,But if If after serilization using existing definition and then add new field as
class A{
private int c1;
private Map<Integer, String> c2;
private Map<Integer, String> c3;
}
And then tries to deserialize existing serialized content(serialized using old definition) it throws
com.esotericsoftware.kryo.KryoException: Buffer underflow.
Serialization trace:
....
at com.esotericsoftware.kryo.io.Input.require(Input.java:199)
at com.esotericsoftware.kryo.io.Input.readVarInt(Input.java:373)
at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:127)
at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:693)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:118)
at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:543)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:709)
My code is thread safe as I am using Kryopool. Does kryo not support schema evolution.
--
You received this message because you are subscribed to the "kryo-users" group.
http://groups.google.com/group/kryo-users
--- You received this message because you are subscribed to a topic in the Google Groups "kryo-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kryo-users/lKVoiZneP-M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kryo-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.