strange: "same erasure" but "does not override" hence Unresolved compilation problem

43 views
Skip to first unread message

doles

unread,
Aug 25, 2011, 10:55:05 AM8/25/11
to google-we...@googlegroups.com
Hello,

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);
}








Reply all
Reply to author
Forward
0 new messages