Alex Rivera | Logout

SerializationPolicy error when performing RPC from within GWT application

Asked 2010-11-17T09:16:27.493
21

I'm getting the following exception:

com.google.gwt.user.client.rpc.SerializationException: Type 'java.lang.Long' 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

using GWT 2.1 and the built in Jetty server. According to the docs, this type is definitely serializable... How can I include it in the SerializationPolicy?

Edit
Report

1 Answer

3

FWIW, I was having this problem but my 'Object' type was hidden behind generified classes. The error message itself was wrong.

So if one of your rpc methods involves a class:

class Xxx<T> implements IsSerializable {...

It needs to change to:

class Xxx<T extends IsSerializable> implements IsSerializable {...
answered 2013-05-22T05:15:01.953

Your Answer