当我们在GWT开发模式下运行我们的应用程序时,我们得到如下所示的序列化异常,如果我们从开发模式之外运行,我们就得不到。有任何想法吗?请注意,所讨论的MySDO类来自com.extjs.gxt.ui.client.data.BaseModel,它本身是可序列化的。还有一个公共的无参数构造函数
Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'com.foo.MySDO' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer.For security purposes, this type will not be serialized.: instance = com.foo.MySDO@fd4410
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:610) [:]
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) [:]
at com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:43) [:]
at com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:36) [:]
答案 0 :(得分:1)
可能是com.foo.MySDO包含一些其他非序列化类型