GWT ASync回拨问题


GWT ASync call back problem

我正在尝试学习GWT,并且一直遵循Google网站上有关GWT的教程指南,网址为http://code.google.com/intl/sv/webtoolkit/doc/latest/tutorial/RPC.html <铅>

我已经到达本教程3. Serializing Java objects部分的结尾,但无法正常工作。基本上,在调用ASync服务时出现一些错误。

我已将错误定位在此处。是的,该对象的创建失败,因此错误被捕获。我不知道是否必须继续进行下一步,但是它在本教程的第3部分末尾说我应该获得一些数字。

1
2
3
4
    AsyncCallback<StockPrice[]> callback = new AsyncCallback<StockPrice[]>() {
      public void onFailure(Throwable caught) {
        // TODO: Do something with errors.
      }

复制此文件所需的所有文件都在主页上。无论如何,有人知道这里可能有什么问题吗?这是错误输出

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[WARN] stockPriceServiceImpl: 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. ( Expecting version 5 from client, got 6. )
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader.java:432)
    at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:236)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:186)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
    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)

看来您的类路径中有gwt-servlet.jar或gwt-user.jar的较旧版本。.

对于相同的问题,请检查以下链接; http://groups.google.com/group/google-web-toolkit/browse_thread/thread/59a0309ffedf4e64/7667ea5361329d53?pli=1

http://squdgy.wordpress.com/2011/01/04/solving-expecting-version-5-from-client-got-6-problem-with-gwt/