Piers MacDonald
Piers MacDonald

Reputation: 563

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.

Upvotes: 8

Views: 11723

Answers (4)

Jason Washo
Jason Washo

Reputation: 625

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

Upvotes: 1

i2B
i2B

Reputation: 61

I had the same problem in DevMode in Eclipse Luna with GWT 2.6.0 and Java 1.8_0_5. Cleaning the project, restarting Eclipse or Windows did NOT help me, but I "solved" the problem by deploying the App to an external Tomcat - which ran fine. And when I returned to Eclipse, the app also ran fine in DevMode on Jetty. Weird. Smells like a bug in the GWT plugin.

Upvotes: 0

lrxw
lrxw

Reputation: 3866

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.

Upvotes: 5

Arun Manivannan
Arun Manivannan

Reputation: 4313

Just a thought. If you are using eclipse GWT plugin, check the eclipse-plugin-configured (or bundled) version of the GWT against the jars that is present in your lib folder.

Upvotes: 0

Related Questions