I'm using GWT (2.4) with Spring integrated as in this article. I have problem with getting list of User from database (Hibernate) and populate DataGrid with it. When i call greetingService.allUsers()
method, I'm getting error (onFailure()):
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: The response could not be deserialized
Anybody helps with that? Below some pieces of code. Full working project is here.
public void onModuleLoad() {
// ...
greetingService.allUsers(
new AsyncCallback<List<User>>(){
@Override
public void onFailure(Throwable caught) {
caught.printStackTrace();
}
@Override
public void onSuccess(List<User> result) {
GWT.log("SIZE: "+result.size());
dataGrid.setRowData(result);
}
}
);
// ...
}
GreetingServiceImpl
@Override
public List<User> allUsers() {
return userDAO.findAll();
}
User
@Entity
@Table(name = "users")
public class User implements Serializable, IsSerializable {
@Id
private Long id;
// only Strings and one Date
private String login;
private String password;
private String firstname;
private String lastname;
private Date date;
}