Hybrid View
-
3 Nov 2010 10:45 AM #1
SerializationException with nested BaseModel objects
SerializationException with nested BaseModel objects
Hi. I did search the forum but found no answers, and I'm not sure it's a GXT or a GWT issue.
I have the following situation:
class CategoryModel extends BaseModel {}
class PersonModel extends BaseModel {
public void setCategory(CategoryModel c) {
set("category", c);
}
public CategoryModel getCategory() {
return get("category");
}
}
In my servlet I read "person" joinning it's "category", create the PersonModel, setting the CategoryModel property after that.
After the method ends, occurs a SerializarionException. The server log shows the following:
Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'br.unitoledo.base2.gwt.client.comum.models.CategoryModel' 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 = br.unitoledo.base2.gwt.client.comum.models.CategoryModel@1b6a48d
The problem occurs only when I have nested ModelData insite another ModelData object. It doesn't work both ways (browser to servlet, servlet to browser).
Somebody having the same problem? Thanx in advance.
-
3 Nov 2010 10:53 AM #2
Code:class PersonModel extends BaseModel { private CategoryModel unsed; public void setCategory(CategoryModel c) { set("category", c); } public CategoryModel getCategory() { return get("category"); } }
-
3 Nov 2010 11:07 AM #3
-
25 Feb 2013 11:19 AM #4
Similar Threads
-
Problem with nested properties in BaseModel
By rotschi in forum Ext GWT: DiscussionReplies: 0Last Post: 25 Sep 2009, 7:13 AM -
GWT cannot serialize collection of BaseModel objects having List<BaseModel> property
By baluba in forum Ext GWT: Bugs (1.x)Replies: 0Last Post: 2 May 2008, 5:00 AM


Reply With Quote