开发者

This application is out of date, please click the refresh button on your browser. ( Expecting version 4 from server, got 5. )

Please some body help me to solve th开发者_如何学Pythonis error "This application is out of date, please click the refresh button on your browser. ( Expecting version 4 from server, got 5. )" . I am using gwt 1.5.0 .


Check if the gwt-servlet.jar is uptodate. The gwt-user.jar and gwt-servlet.jar must have the same version.


Looks like you are getting IncompatibleRemoteServiceException exception. It says, that version of RPC server interface differs from interface, which RPC client is trying to use. Typically that happens, when you are actively developing client part and server part, and for some reason you forget to restart server or refresh your GWT application in browser after some RPC interface changes.

You can get more information in GWT docs (here and here) and in exception description.


In my case I've got this error after moving my servlet implementation to another package. But I have forgotten to rename it in web.xml.


Copy the latest gwt-servlet.jar file to WEB-INF/lib folder.


In my case, I was refactoring to provide separate servlets for major functionality and forgot one thing:

Ensure that @RemoteServiceRelativePath(XXXX) in your RemoteService interface matches the url-pattern in your web.xml


The problem was gwt-user.jar was not being accessed from maven repository. The path of gwt-user.jar was not pointing to repository instead it was pointing to desktop location where i had this jar file.. I just changed its path to repository then this error went off.


Check whether your web.xml has not syntax errors. If so, your jars will not compile properly and GWT will take the old ones. I had that error and my solution was fix web.xml syntax.


PROBLEM SOLVED (at least my version of it)

My setup: GWT Project in Eclipse. Used Maven to pull down jars which I manually then add to LIB folder, because I haven't found a viable way to fully integrate Maven and GWT development.

ERROR: Exception thrown while processing this call: unknown method -> Exception: com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException message: This application is out of date, please click the refresh button on your browser. ( Expecting version 5 from client, got 7. )

SOLUTION: Look for which dependency is pulling in gwt-user module (jar), because that is the likely cause of the problem. First verify deleting the gwt-user jar from your LIB folder fixes problem, and then you can also modify your Maven to use an EXCLUDE for 'gwt-user' as follows:

<dependency>
    <groupId>com.google.gwt.google-apis</groupId>
    <artifactId>gwt-visualization</artifactId>
    <version>1.0.2</version>
    <exclusions>
        <exclusion>
          <groupId>com.google.gwt</groupId>
          <artifactId>gwt-user</artifactId>
        </exclusion>
        </exclusions>
</dependency>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜