GWT IncompatibleRemoteServiceException

Straight ahead, but crazy, I get this error when calling RPC:

While processing this call, an IncompatibleRemoteServiceException was thrown. com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: invalid type signature for com.milkrun.core.dto.UserBasket

Here is the class causing the problem:

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 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 am going wrong, and I don't want to use IsSerializable, since these DTOs are in a project shared by the android application, and IsSerializable is part of the GWT stack.

+6
source share
4 answers

I experienced this problem with the berth in development mode. In my case, the problem was that the berth was not doing β€œclean”. I manually deleted the .jar of my gwt module in the workspace / .metadata / .plugins / org.eclipse.wst.server.core / (e.g. my-module.jar)

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

+3
source

Just a thought. If you use the eclipse GWT plugin, check the GWT configuration configured on the eclipse-plugin (or bundled) against the banners that are present in your lib folder.

0
source

I had the same problem in DevMode on Eclipse Luna with GWT 2.6.0 and Java 1.8_0_5. Cleaning up the project, restarting Eclipse or Windows did NOT help me, but I "solved" the problem by deploying the application for external Tomcat ), which went fine. And when I returned to Eclipse, the application also worked fine in DevMode on Jetty. Weird It smells like an error in the GWT plugin.

0
source

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

0
source

Source: https://habr.com/ru/post/906287/


All Articles