It\'s been a while since I\'ve been doing GWT and I needed something small done quickly. I set things up and now I have a RPC I need, but it fails.
The RPC is suppos
I get also this error when I used sublist:
return myList.subList(fromIndex, toIndex);
As mentioned by Cipous, in my case I had this exception thrown in the server output in Pentaho BI Server. A simple hard reload (CTRL+F5) did the trick.
This is normally caused by using a non-serializable class, which can occur if your class does not implement com.google.gwt.user.client.rpc.IsSerializable
or if you have forgotten to add an empty constructor.
To pass a bean you have to fulfill the following requirements (from GWT site):
Even if you fulfill these requirements may happen that GWT compiler say:
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 = @
The problem may have different causes. Here his a complete check list to use for solving the problem:
PS:copied from http://isolasoftware.it/2011/03/22/gwt-serialization-policy-error/ because the site is unavailable currently. If you want to read the original article search it from google using the above URL and read it from google web cache.
In my case there is some old cache in my target
folder that wasn't properly updated. I had to rebuild the project (Maven -> Update Project) and then it worked.
First of all, be sure to have defined an empty constructor.
If not, your class will not be serializable ...
If you have an empty constructor, be sure that your class (or any class in the extends chain) implements IsSerializable (or any other interface which extends IsSerialisable)
If your class implements IsSerialisable, check it is non-final ...
Ahother reason for this exeption was outdated javascript on browser side. I had to hard reload (CTRL+F5) the code and this exception was gone.