chpooo / kryo

Automatically exported from code.google.com/p/kryo
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Can not serialize,please help! #55

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It shows message:

com.esotericsoftware.kryo.KryoException: java.lang.IllegalArgumentException: 
Unable to create serializer 
"com.esotericsoftware.kryo.serializers.FieldSerializer" for class: 
java.awt.geom.Ellipse2D$Double
Serialization trace:
ellipse (org.jhotdraw.samples.svg.figures.SVGEllipse)
updater (com.lorent.whiteboard.command.impl.BroadcastCommand)
    at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:189) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:405) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:170) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:390) ~[kryo2-2.02-all.jar:na]
    at com.lorent.whiteboard.server.db.DatabaseOutputStream$1.run(DatabaseOutputStream.java:42) ~[bin/:na]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_31]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_31]
    at java.lang.Thread.run(Thread.java:662) [na:1.6.0_31]
Caused by: java.lang.IllegalArgumentException: Unable to create serializer 
"com.esotericsoftware.kryo.serializers.FieldSerializer" for class: 
java.awt.geom.Ellipse2D$Double
    at com.esotericsoftware.kryo.Kryo.newSerializer(Kryo.java:239) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.Kryo.getDefaultSerializer(Kryo.java:219) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.Kryo.getRegistration(Kryo.java:329) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.Kryo.writeClass(Kryo.java:357) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:168) ~[kryo2-2.02-all.jar:na]
    ... 7 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.6.0_31]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) ~[na:1.6.0_31]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) ~[na:1.6.0_31]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513) ~[na:1.6.0_31]
    at com.esotericsoftware.kryo.Kryo.newSerializer(Kryo.java:226) ~[kryo2-2.02-all.jar:na]
    ... 11 common frames omitted
Caused by: java.lang.IncompatibleClassChangeError: Found class 
org.objectweb.asm.MethodVisitor, but interface was expected
    at com.esotericsoftware.reflectasm.FieldAccess.get(FieldAccess.java:50) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.serializers.FieldSerializer.rebuildCachedFields(FieldSerializer.java:115) ~[kryo2-2.02-all.jar:na]
    at com.esotericsoftware.kryo.serializers.FieldSerializer.<init>(FieldSerializer.java:49) ~[kryo2-2.02-all.jar:na]
    ... 16 common frames omitted

Original issue reported on code.google.com by vylo...@gmail.com on 9 Apr 2012 at 9:02

GoogleCodeExporter commented 8 years ago
I'm unable to reproduce this problem. Can you please post runnable example code 
the exhibits the problem?

Original comment by nathan.s...@gmail.com on 9 Apr 2012 at 12:00

GoogleCodeExporter commented 8 years ago
It is my fault!My projects depend on asm4.Thanks for your reply!This is a great 
project,too!

Original comment by vylo...@gmail.com on 10 Apr 2012 at 2:46

GoogleCodeExporter commented 8 years ago
:)

Original comment by nathan.s...@gmail.com on 10 Apr 2012 at 3:32

GoogleCodeExporter commented 8 years ago
Actually, this was a bug in ReflectASM that only ASM 4.0 caught. Updating 
ReflectASM and Kryo now.

Original comment by nathan.s...@gmail.com on 10 Apr 2012 at 12:31