Odd IncompatibleRemoteServiceException

31 views
Skip to first unread message

darkling

unread,
Oct 27, 2011, 9:39:03 AM10/27/11
to Google Web Toolkit

We've been building this application for several months no problems
until now. We haven't upgraded any jars but we did upgrade the Eclipse
GWT plugin the other day. Since then the application works ok in
normal mode but when I try to debug it in hosted mode it fails with
the following exception:

Invalid version number "2.0" passed to external.gwtOnLoad(), expected
"2.1"; your development mode bootstrap file may be out of date; if you
are using -noserver try recompiling and redeploying your app; if you
just switched to a different version of GWT, try clearing your browser
cache

I tried doing a clean, clearing browser cache, all that. I found where
in the hosted.html file the version number is set. I have been going
in manually to change it to 2.1 but that's very annoying. I'm using
maven gwt plugin. Can anyone tell me where to change it permanently?

The bigger problem is that after I have changed the version number I
am still unable to debug in hosted mode. Then it crashes with this
exception:

SEVERE: Login: 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 7. )


As I said we didn't change anything except possibly the eclipse
plugin. I can't just get all latest from GWT because we're using EXT-
GWT as our main library and I'm worried it won't be yet compatible.


For an experiment I created a brand new GWT application that doesn't
use EXT-GWT or Maven and it worked correctly in hosted mode, up to and
including having version number 2.1. I'm really not sure what to try
next.

Any suggestions would be great I have a delivery on Monday and have
been beating my head against this for a week. I can't debug anything
while this issue remains.
Thanks

Jens

unread,
Oct 27, 2011, 10:13:11 AM10/27/11
to google-we...@googlegroups.com
An IncompatibleRemoteServiceException is thrown when you have an old gwt-servlet.jar in your WEB-INF/lib folder. 
Your client speaks version 7 while your server only understands (and expects) version 5. Just copy the correct GWT 2.1 gwt-servlet.jar into your WEB-INF/lib folder.

Regarding your hosted mode file, have you tried to rename <your war folder>/<your app folder> so GWT has to regenerate it?

darkling

unread,
Oct 27, 2011, 11:11:45 AM10/27/11
to Google Web Toolkit
It does have to regenerate it. Our build system actually deletes it
everytime it runs but the hosted.html file actually has a modified
date of February. I'm not sure how that's possible, it must be being
copied from somewhere by GWT

darkling

unread,
Oct 27, 2011, 11:33:01 AM10/27/11
to Google Web Toolkit
I tried grabbing gwt-servlet.jar and that did fix the second issue,
assuming I manually change the verison number in hosted.html I can run
the program in hosted mode. But when I regenerate hosted.html it
always puts 2.0

If anyone can give me any suggestions that would be great
Thanks for all the help so far

darkling

unread,
Oct 27, 2011, 1:45:43 PM10/27/11
to Google Web Toolkit
Can anyone tell me what jar or property makes the client want version
number 7? I'd much rather revert the client to the correct version we
support than try to update the server right before a release
Thanks

Jens

unread,
Oct 27, 2011, 2:41:10 PM10/27/11
to google-we...@googlegroups.com
Just make sure you use gwt-user.jar and gwt-servlet.jar (and gwt-dev.jar) of the same GWT version. I think you should also use the gwt-maven-plugin with the same version as your GWT jars. 

I dont think that you can change the GWT-RPC version manually.
Reply all
Reply to author
Forward
0 new messages