我的 GWT 项目运行良好,但今天,经过一些更改并添加新功能后,
不执行异步调用。例外情况是“此应用程序已过期
日期,请单击浏览器上的刷新按钮。”所有其他
执行异步调用。
An IncompatibleRemoteServiceException was thrown while processing this call.
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This application is out of date, please click the refresh button on your browser. ( Blocked attempt to access interface 'com.client.FInterface', which is not implemented by 'com.server.FServiceImpl'; this is either misconfiguration or a hack attempt )
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:252)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:206)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
Client :
public void onClick(ClickEvent event) {
fService.getRepositories(repocallback);
}
});
界面
@RemoteServiceRelativePath("init")
public interface FInterface extends RemoteService{
FCollection getRepositories();
}
异步接口
public interface FInterfaceAsync {
void getRepositories(AsyncCallback<FCollection> repositoryCallback);
}
Service
public class FService implements FInterfaceAsync {
FInterfaceAsync service =(FInterfaceAsync)GWT.create(FInterface.class);
ServiceDefTarget endpoint = (ServiceDefTarget) service;
public FService(){
endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "init");
}
}
Server
public class FServiceImpl extends RemoteServiceServlet implements FInterface {
public FilnetFolderCollection getRepositories() {
}
}
XML :
<servlet>
<servlet-name>FServlet</servlet-name>
<servlet-class>com.server.FServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FServlet</servlet-name>
<url-pattern>/FServiceImpl</url-pattern>
</servlet-mapping>
有人帮我解决这个问题。