Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

数据长度大,序列化不了 #681

Closed
xysoko opened this issue Jun 18, 2016 · 4 comments
Closed

数据长度大,序列化不了 #681

xysoko opened this issue Jun 18, 2016 · 4 comments
Milestone

Comments

@xysoko
Copy link

xysoko commented Jun 18, 2016

[2016-06-18 15:54:26 ERROR][ServerHeartTimer]com.alibaba.fastjson.JSONException: create asm serializer error, class class com.game.player.structs.Player
com.alibaba.fastjson.JSONException: create asm serializer error, class class com.game.player.structs.Player
at com.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:170)
at com.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:117)
at com.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:504)
at com.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:320)
at com.alibaba.fastjson.serializer.JSONSerializer.getObjectWriter(JSONSerializer.java:318)
at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:261)
at com.alibaba.fastjson.JSON.toJSONString(JSON.java:547)
at com.alibaba.fastjson.JSON.toJSONString(JSON.java:536)
at com.game.player.Manager.PlayerManager.makeRoleBeanByPlayer(PlayerManager.java:335)
at com.game.player.Manager.PlayerManager.timingSavePlayer(PlayerManager.java:1013)
at com.game.Server.Timer.ServerHeartTimer.action(ServerHeartTimer.java:38)
at game.core.net.thread.ServerThread.run(ServerThread.java:110)
Caused by: java.lang.ClassFormatError: Invalid method Code length 68840 in class file com/alibaba/fastjson/serializer/ASMSerializer_57_Player
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at com.alibaba.fastjson.util.ASMClassLoader.defineClassPublic(ASMClassLoader.java:174)
at com.alibaba.fastjson.serializer.ASMSerializerFactory.createJavaBeanSerializer(ASMSerializerFactory.java:396)
at com.alibaba.fastjson.serializer.SerializeConfig.createASMSerializer(SerializeConfig.java:95)
at com.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:163)

用最新1.2.12 序列化出错, 用1.2.5序列化OK的, 做游戏的, 这个类数据很大

@wenshao
Copy link
Member

wenshao commented Jun 20, 2016

类结构很大?大概怎样的?能方便把Player的类结构提供一下么?

@wenshao wenshao added this to the 1.2.13 milestone Jun 20, 2016
@xysoko
Copy link
Author

xysoko commented Jun 21, 2016

类结构很大,整个游戏玩家个体的所有数据都在这个类中

@wenshao
Copy link
Member

wenshao commented Jun 21, 2016

多少个字段?

@xysoko
Copy link
Author

xysoko commented Jun 22, 2016

一个字段

wenshao added a commit that referenced this issue Jun 26, 2016
@wenshao wenshao closed this as completed Jun 27, 2016
asa1997 pushed a commit to Be-Secure/fastjson that referenced this issue Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants