升级所有库后,我才开始遇到此问题:
我使用的是 GWT 2.4、App Engine 1.6.3 和 Objectify 3.0。
我升级到 GWT 2.5、App Engine 1.7.4 和 Objectify 4.0b1。
从那以后,我收到了这个奇怪的错误,整个互联网上似乎只有另外一个人!
堆栈跟踪:
Caused by: com.google.gwt.user.client.rpc.SerializationException: com.google.appengine.api.datastore.Key/1349195865
at com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:153)
at com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate(SerializerBase.java:114)
at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:396)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.googlecode.objectify.Key_FieldSerializer.deserialize(Key_FieldSerializer.java:11)
at com.googlecode.objectify.Key_FieldSerializer.deserial(Key_FieldSerializer.java:29)
at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)
at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.deserialize(Collection_CustomFieldSerializerBase.java:34)
at com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.deserialize(ArrayList_CustomFieldSerializer.java:34)
at com.google.gwt.user.client.rpc.core.java.util.ArrayList_FieldSerializer.deserial(ArrayList_FieldSerializer.java:19)
at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)
at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.utilitiessavings.testapp2.shared.Account_FieldSerializer.deserialize(Account_FieldSerializer.java:29)
at com.utilitiessavings.testapp2.shared.Account_FieldSerializer.deserial(Account_FieldSerializer.java:51)
at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)
at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.deserialize(Collection_CustomFieldSerializerBase.java:34)
at com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.deserialize(ArrayList_CustomFieldSerializer.java:34)
at com.google.gwt.user.client.rpc.core.java.util.ArrayList_FieldSerializer.deserial(ArrayList_FieldSerializer.java:19)
at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)
at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.utilitiessavings.testapp2.client.action.GetAccountsResult_FieldSerializer.deserialize(GetAccountsResult_FieldSerializer.java:20)
at com.utilitiessavings.testapp2.client.action.GetAccountsResult_FieldSerializer.deserial(GetAccountsResult_FieldSerializer.java:38)
at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)
at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter$ResponseReader$8.read(RequestCallbackAdapter.java:106)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:214)
... 27 more
反序列化 Account 时会出现问题,因为它包含包装本机数据存储密钥的 Objectify Key。
序列化工作正常,我的对象图在数据存储中一切都很好而且花花公子,我只是无法取回任何包含密钥的东西,这几乎是所有有用的东西。
任何指针表示赞赏。