I have time returning an ArrayList of objects that implement IsSerializable through RPC. IsSerializable pojo contains one variable, String and has a parameter constructor of 0. I deleted the .gwt.rpc file from my war and still get:
com.google.gwt.user.client.rpc.SerializationException: Type 'com.test.myApp.client.model.Test' 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.test.myApp.client.model.Test@17a9692 at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:610)
I am using GWT 2.0.2 with jdk 1.6.0_18.
Any ideas on what might happen or what am I doing wrong?
Here is the code for the Test class, and the remote method returns an ArrayList. I even modified the code to just return one instance of Test with the same result: the exception is above.
package com.test.myApp.client.model; import com.google.gwt.user.client.rpc.IsSerializable; public class Test implements IsSerializable{ private String s; public Test() {} public Test(String s) { this.s = s; } public String getS() { return s; } public void setS(String s) { this.s = s; } }
Thank you for your help! Eddy
serialization gwt
Eddy
source share