PDA

View Full Version : SeralizationException



twinst
24 Aug 2009, 12:15 AM
I came up with a problem while using GXT RpcCall.

a class defined as this:
public class A implements java.io.Serializable, BeanModelTag{
private String _name;
private java.util.Date _date;
public A(){}
public void setName(String name){
_name = name;
}
public String getName(){
return _name;
}
public void setDate(java.util.Date date){
_date = date;
}
public java.util.Date getDate(){
return _date;
}
}

RpcProxy proxy = new RpcProxy(){

protected void load(Object o, AsyncCallback<PagingLoadResult<A> asyncCallback)
{
ServiceProvider.getInstance().getTestService().getData((PagingLoadConfig)o, asyncCallback);
}
};

//get an error SerializationException

but when i use another service which defined the same interface and same realization in its ServiceImpl, it works.
like this:
ServiceProvider.getInstance().getTestService2().getData((PagingLoadConfig)o, asyncCallback);


I just have no idea how to make it work.

Waiting for your reply. thanks in advance.