I have an RPC service that fails at run time due to an error that i did not expect the occur. Strangely, i dont know what I am doing wrong here. The error message and my code is as follows. The only generic I have is the AsyncCallback method param. And when i take out that generic from the callback parameter, all this works just fine! I thought this is how i coded forever in GWT. No?:
Caused by: java.lang.Error: Unresolved compilation problem:
Name clash: The method fetchChartData(IsChart.Names, AsyncCallback) of type DashboardService_Proxy has the same erasure as fetchChartData(IsChart.Names, AsyncCallback<ChartData>) of type DashboardServiceAsync but does not override it
public interface DashboardServiceAsync {
public void fetchChartData(IsChart.Names chartName, AsyncCallback<ChartData> callback);
}
public class DashboardServiceImpl extends RemoteServiceServlet implements DashboardService {
@Override
public ChartData fetchChartData(IsChart.Names chartName) {
}
}
@RemoteServiceRelativePath("DashboardService")
public interface DashboardService extends RemoteService {
/**
* Utility/Convenience class.
* Use DashboardService.App.getInstance() to access static instance of DashboardServiceAsync
*/
public static class App {
private static final DashboardServiceAsync ourInstance = (DashboardServiceAsync) GWT.create(DashboardService.class);
public static DashboardServiceAsync getInstance() {
return ourInstance;
}
}
public ChartData fetchChartData(IsChart.Names chartName);
}
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/km_rIM7NaSMJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment