我们有一个GWT控制器。
@RemoteServiceRelativePath("xcontroller")
public interface MobileController extends RemoteService {
WaterUtilityUserDataset getWaterUtilityUserDataset(String p_SearchText,
int p_PageSize, int p_CurrentPage);
}
接口MobileControllerAsync
重新声明MobileController
中的方法。
public interface MobileControllerAsync {
void getWaterUtilityUserDataset(String p_SearchText, int p_PageSize,
int p_CurrentPage, AsyncCallback<WaterUtilityUserDataset> callback);
}
MobileControllerImpl
实施MobileController
。
public class MobileControllerImpl extends RemoteServiceServlet implements
MobileController {
@Override
public WaterUtilityUserDataset getWaterUtilityUserDataset(String p_SearchText,
int p_PageSize, int p_CurrentPage) {
// TODO Auto-generated method stub
return AppSwitch.getWaterUtilityUserDataset(p_SearchText, p_PageSize,
p_CurrentPage);
}
}
存在MobileControllerMgr
以将异步调用转换为同步调用。
public class MobileControllerMgr {
private static final MobileControllerAsync controller = GWT
.create(MobileController.class);
public static void getWaterUtilityUserDataset(String l_searchText,
int m_ResultSize, int currentpage,
AsyncCallback<WaterUtilityUserDataset> callback) {
controller.getWaterUtilityUserDataset(l_searchText, m_ResultSize,
currentpage, callback);
}
客户端代码调用MobileControllerMgr
。
MobileControllerMgr.getWaterUtilityUserDataset(
l_searchText,
m_ResultSize,
1,
getcallbackWaterUtilityUserList(p_uiList, p_uiListScroll,
p_uiPaginate, p_uiWait)
);
回调报告错误。从日志中检索以下内容:
Starting Jetty on port 8888
[WARN] xcontroller: 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. ( Could not locate requested method 'getWaterUtilityUserDataset(java.lang.String, int, int)' in interface 'com.nirvasoft.rpmini.client.controller.mobilebanking.MobileController' )
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:319)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:206)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
这里可能有什么问题?
答案 0 :(得分:1)
您看到的例外解释了错误:
此应用程序已过期,请单击“刷新”按钮 你的浏览器。
当您的浏览器中的代码来自与服务器上的代码不同的版本时,会发生这种情况。