0

我在共享文件夹中有一个朋友类。RPC 返回的 ArrayList 的类型。第一次上传项目时出现以下异常:

javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type 'com.aman.gwt.friendlist.shared.Friend' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = com.aman.gwt.friendlist.shared.Friend@6cffbb
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:665)

所以为了解决这个问题,我导入了 java.io.Serializable,实现了它并声明了

private static final long serialVersionUID=-3195362485601524606L;

但现在我在应用引擎上收到 500 个服务器错误。我检查了日志,但什么也没有。

更新:这是一个临时问题。有时在更新应用程序时发生。

4

1 回答 1

0

您的类(以及任何自己的类使用!)的源代码是否在工件中可用 - 缺少通常会导致这样的错误。另一个可能的原因是.gwt.xml 描述符中出现错误或缺失。FriendFriend<inherits ...<source ...

干杯,

于 2012-10-14T10:18:56.100 回答