I'm using gwt and I'm using mapdb and when I retrieve data as a map (BTreeMap) gwt throw rpc serialization exception. I wrapped the map in an object that implements Serializable
and IsSerializable
but that don't work.
I don't know why this doesn't work because I read the documentation of mapdb and I use that correctly.
That's the code:
public class WrapperObject implements Serializable, IsSerializable {
private Map<String, List<String>> map;
public WrapperObject() {}
public WrapperObject(Map<String, List<String>> map) {
this.map = map;
}
//GETTERS AND SETTERS
...
}
public class Prova {
....
private DB openDB() {
return DBMaker.shoutdownOnJvmClose().make();
}
...
public WrapperObject retrieveData() {
DB db = this.openDB();
Map<String, List<String>> map =
db.getTreeMap("values");
return new WrapperObject(map);
}
}
Then in the client class I create a Tree with treeItem using the map.
Thank you for help.