Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT IncompatibleRemoteServiceException

Straight forward but maddening, I get this error on my RPC call:

An IncompatibleRemoteServiceException was thrown while processing this call. com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: Invalid type signature for com.milkrun.core.dto.UserBasket

Here is the class causing the issue:

public class UserBasket implements Serializable{

     private static final long serialVersionUID = -6761554796753637352L;

    public int userBasketID;
    public String description;
    public String userID;

    public List<BasketItem> items;

    public String createUserId;
    public Timestamp createTs;
     public String lastUpdateUserId;
    public Timestamp lastUpdateTs;
    public Timestamp effStartTs;
    public Timestamp effStopTs;

}

And the type BasketItem:

public class BasketItem implements Serializable {


private static final long serialVersionUID = -17764683871112216L;

public int basketItemID;

public String upc;
public String description;
public String brandName;

public BigDecimal price;

public String createUserId;
public Timestamp createTs;
public String lastUpdateUserId;
public Timestamp lastUpdateTs;
public Timestamp effStartTs;
public Timestamp effStopTs;

}

I'm not sure where I'm going wrong and I'd rather not use IsSerializable as these DTOs are in a project shared by an android app too and IsSerializable is part of the GWT stack.

like image 960
Piers MacDonald Avatar asked Jan 18 '12 10:01

Piers MacDonald


2 Answers

I experienced this issue with the jetty in development mode. The problem in my case was that the jetty didnt do a "clean". I removed manually the .jar of my gwt module in workspace/.metadata/.plugins/org.eclipse.wst.server.core/ (e.g. my-module.jar)

After that, the class on the server side and client site were the same again.

like image 151
lrxw Avatar answered Oct 04 '22 14:10

lrxw


In Eclipse, simply Project > Clean... worked for me.

like image 25
Jason Washo Avatar answered Oct 04 '22 15:10

Jason Washo