0
我正在关注here的教程。 我试图从我的模块进行RPC调用。但我得到这个错误。java.lang.RuntimeException:GWT中的延迟绑定错误
java.lang.RuntimeException: Deferred binding failed for 'myPackageName.client.StockPriceService' (did you forget to inherit a required module?)
我StockPriceService类是:
@RemoteServiceRelativePath("stockPrices")
public interface StockPriceService extends RemoteService{
StockPrice[] getPrices(String[] symbols) throws DelistedException;
}
StockPriceServiceAsync类是:
public interface StockPriceServiceAsync {
void getPrices(String[] symbols, AsyncCallback<StockPrice[]> callback);
}
我StockPrice类是:
public class StockPrice implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private String symbol;
private double price;
private double change;
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public double getChange() {
return change;
}
public void setChange(double change) {
this.change = change;
}
public double getChangePercent() {
return 100.0 * this.change/this.price;
}
public StockPrice(String symbol, double price, double change) {
super();
this.symbol = symbol;
this.price = price;
this.change = change;
}
}
我总是得到错误,当以下里ne在我的EntryPoint中执行类
private StockPriceServiceAsync stockPriceSvc = GWT.create(StockPriceService.class);
任何形式的帮助表示赞赏。
请发布完整的堆栈跟踪,将有根本原因的详细信息 – nayakam 2015-02-10 05:15:02
您可以发布您的StockPrice类 – nayakam 2015-02-10 05:17:23
@Thillakan,已更新。一探究竟。 – 2015-02-10 05:20:59