在 GWT 开发模式下运行时出现 com.google.gwt.user.client.rpc.SerializationException

发布于 2024-11-02 01:16:43 字数 1032 浏览 0 评论 0原文

当我们在 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) [:]

When we run our application in GWT Dev Mode, we are getting serialization exceptions as shown below that we do not get if we run from outside of dev mode. Any ideas? Please note that the class MySDO in question extends from com.extjs.gxt.ui.client.data.BaseModel which is itself serializable & also has a public no parameter contructor

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) [:]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谈场末日恋爱 2024-11-09 01:16:43

可能 com.foo.MySDO 包含一些其他不可序列化的类型

May be com.foo.MySDO include some other not serialiseble type

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文