Closed GoogleCodeExporter closed 9 years ago
I think my issue is related. We're using 2.14. This one field cannot be
serialized:
public SortedStringIndex<List<T>> index = new SortedStringIndex<List<T>>();
Stack trace:
com.esotericsoftware.kryo.KryoException: java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to
java.lang.Class
Serialization trace:
index ([omitted package name (it's ours)])
digraphKeyMappedTokens ([omitted package name (it's ours)])
dynamicGraph ([omitted package name (it's ours)])
languageContainers ([omitted package name(it's ours)])
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:208)
at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:393)
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:187)
at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:393)
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:187)
at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:481)
at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:95)
at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:18)
at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:393)
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:187)
at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:371)
at [omitted package name (it's ours)](CacheWriter.java:64)
at [omitted package name (it's ours)](CacheWriter.java:94)
at [omitted package name (it's ours)](Publisher.java:98)
at [omitted package name (it's ours)](QuickTest.java:229)
...
Original comment by seandod...@gmail.com
on 31 Jul 2012 at 5:05
This issue was closed by revision r337.
Original comment by nathan.s...@gmail.com
on 18 Aug 2012 at 4:02
This one was interesting, see the javadocs for Kryo#references() and then
TreeMapSerializer for the fix. Thanks for reporting the issue!
Original comment by nathan.s...@gmail.com
on 18 Aug 2012 at 4:02
Original issue reported on code.google.com by
rawl...@gmail.com
on 24 Jul 2012 at 9:39