我在共享文件夹中有一个朋友类。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 个服务器错误。我检查了日志,但什么也没有。
更新:这是一个临时问题。有时在更新应用程序时发生。