I\'m getting the following exception:
com.google.gwt.user.client.rpc.SerializationException: Type \'java.lang.Long\' was not included in the set of ty
FYI I've raised this as a GWT bug: http://code.google.com/p/google-web-toolkit/issues/detail?id=5811
We'll see what they say.
Try deleting the *.gwt.rpc files in your war/app directory, clean and rebuild.
One thing to note: you should avoid long or Long if possible because they are
emulated on GWT (because there is no native Javascript long) and very
slow. Use int instead where ever you can.
Inspired by http://groups.google.com/group/google-web-toolkit/browse_thread/thread/7dd5123d359ddfa8
Using eclipse and maven and gwt 2.1.1
Compile and deploy gwt war.
Try using OOPHM launched from Eclipse.
This would fail for me.
This will generate in server logs:
ERROR: The serialization policy file 'blah.gwt.rpc' was not found; did you forget to include it in this deployment?
WARNING: Failed to get the SerializationPolicy '94DEC228B2828D3A5897FEE3D6845A40' for module 'http://blah:8080/BlahUI/BlahUI/'; a legacy, 1.3.3 compatible, serialization policy will be used. You may experience SerializationExceptions as a result.
And then
Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type '[LpathToClass;' 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 = [LpathToClass;@9d524af at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:614)
Now that extra gwt.rpc files have been generated (either by eclipse/maven plugin who knows?)
Recompile (even a clean compile will work because the gwt.rpc files are not in the target folder, my OOPHM gwt.rpc files are at same folder as entrypoint html) and redeploy. This new war file will contain the generated gwt.rpc files.
Relaunch OOPHM from Eclipse.
Works for me.
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 {...