This application is out of date, please click the refresh button on your browser

1,473 views
Skip to first unread message

Ian Bambury

unread,
May 30, 2007, 9:36:44 AM5/30/07
to Google-We...@googlegroups.com
Why does v1.4 give me the message "This application is out of date, please click the refresh button on your browser" seemingly at random when I just click a button in a hosted app?
 
Thanks
 
Ian
 
========================================================================
Internet communications are not secure  and  therefore  I do not accept
legal responsibility for  the contents  of this message.   Any views or
opinions  do  not  necessarily  represent  what I really think   unless
otherwise specifically stated  and  even then,  I might still be lying.
Batteries not included. Contents may go up as well as down.  Shares may
vary in size. May cause drowsiness,  if affected, go to bed.  This page
intentionally left blank.
========================================================================

Ian Bambury

unread,
May 31, 2007, 6:06:25 AM5/31/07
to Google-We...@googlegroups.com
I get this at the same time
 
Some idea of why this is happening would be really useful. 1.3.3 was fine
 
Ian
 
[WARN] Exception thrown into JavaScript
com.google.gwt.user.client.rpc.SerializationException: java.lang.NullPointerException/1463492344
 at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:481)
 at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:248)
 at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:113)
 at com.viewsonic.spa.client.rpc.SPARPCInterface_TypeSerializer.instantiate (transient source for com.viewsonic.spa.client.rpc.SPARPCInterface_TypeSerializer:96)
 at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:92)
 at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:61)
 at com.viewsonic.spa.client.rpc.SPARPCInterface_Proxy$4.onCompletionImpl(transient source for com.viewsonic.spa.client.rpc.SPARPCInterface_Proxy:248)
 at com.viewsonic.spa.client.rpc.SPARPCInterface_Proxy$4.onCompletionAndCatch(transient source for com.viewsonic.spa.client.rpc.SPARPCInterface_Proxy:234)
 at com.viewsonic.spa.client.rpc.SPARPCInterface_Proxy$4.onCompletion(transient source for com.viewsonic.spa.client.rpc.SPARPCInterface_Proxy:228)
 at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java :126)

 
--
Ian
http://roughian.com

Ian Petersen

unread,
May 31, 2007, 7:51:07 PM5/31/07
to Google-We...@googlegroups.com
Hey Ian,

I'm getting a similar error, except it can't deserialize a Double,
rather than a NullPointerException. Any chance you're using a
_CustomFieldSerializer? (I ask because I _am_ using one, and the
failure occurs midway through its deserialize call, although my stack
trace is almost identical to yours.)

I've filed issue 1129 in response to this problem, so maybe you can
help the GWT people narrow down the problem?

Ian

--
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com

Ian Bambury

unread,
Jun 1, 2007, 8:19:36 AM6/1/07
to Google-We...@googlegroups.com
My problem was that MySql was hitting an error (still not sure how it does this) and an arraylist I was returning was empty (not null).
 
I'd declared @gwt.typeArgs to a record type, but GWT cannot cope with zero results, so I had to code a workaround and return the first item as a status string so GWT has something to do.
 
Presumably there is a reason for this behaviour, and for telling you that your application is out of date when in actuality it can't deserialise something. It would be nice to know, though, how 'proppa' programmers handle finding no records in a database.
 
Ian

 

AlW

unread,
Jun 4, 2007, 10:46:44 AM6/4/07
to Google Web Toolkit
Yea, I'm seeing this problem too... anyone got any ideas? I'm not
using any custom serializers. Everything works fine in 1.3, but as
soon as I upgraded I get the dreaded "This application is out of date,
please click the refresh button on your browser" everytime it tries to
make an RPC call.

Ian Bambury

unread,
Jun 4, 2007, 10:53:47 AM6/4/07
to Google-We...@googlegroups.com
You're doing something wrong (I expect you guessed that) in the RPC call, possibly returning something GWT can't or won't deserialise (this message appears to be code for errors like that, and a number of others, too, none of which necessarily mean your application is out of date).

Ian Petersen

unread,
Jun 4, 2007, 11:02:27 AM6/4/07
to Google-We...@googlegroups.com

The deserialization code is failing (probably because you've sent it
something it can't deserialize) and then wrapping the failure in the
exception that says "This application is out of date...". The stack
trace that appears in the tree logger should show you which class is
the problem (it'll show up as com.example.MyClass/571230, where the
number is a checksum of com.example.MyClass' source code).

Ksenia

unread,
Jun 20, 2007, 1:31:53 AM6/20/07
to Google Web Toolkit
I had the same problem and I figured out it was due to the Date
returned from the database. It wasn't in the same format as the
java.util.Date (although it was declared as java.util.Date). I just
created a new date like this

Date newDate = new Date(dateBaseDate.getTime()));

and passed the newDate in on of the fields of the return type.

Read more about it in this thread
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/2796dfc956e40a57/430e227dbd57bb31?lnk=gst&q=date+sql+date&rnum=5&hl=en#430e227dbd57bb31

sbbg

unread,
Jun 25, 2007, 2:38:35 AM6/25/07
to Google Web Toolkit
I just tried to call RPC which simply return a new string.
just like simply:

return new String("rpc returned string");

But it show the same message, and nothing more.
I have totally no idea what and how to trace around.

Now that it's simply a String, I guess it shouldn't have anything
wrong with deserialization, right? Could it be anything else?

Thanks.

Ian Bambury

unread,
Jun 25, 2007, 2:57:27 AM6/25/07
to Google-We...@googlegroups.com
Hi,
 
If you are returning null, then you will get this, also if you are returning (or somehow creating) a non-serialisable error.
 
Posting the RPC code would let people have more of an idea of what it might be
 

sbbg

unread,
Jun 25, 2007, 3:11:56 AM6/25/07
to Google Web Toolkit

Thanks for the reply first : )
It's a great comfort to learn it's ok to post these code here.
I've tried the following code in a new, clean helloWorld project.
And it failed as well.

In server side, looks like:

public String generateXSLTFile( String rowExpandNode, String[]
checkedNodesArray )
{
String returning= new String( "generateXSLTFile call succeed" );
return returning;
}
======================================
In client side, the interface looks like :

package demo1.client;

import com.google.gwt.user.client.rpc.RemoteService;

public interface GenerateXSLTFile extends RemoteService
{
public String generateXSLTFile( String rowExpandNode, String[]
checkedNode );
}
==================================================
And the Asynchrous interface looks like:

package demo1.client;

import com.google.gwt.user.client.rpc.AsyncCallback;

interface GenerateXSLTFileAsync
{
public void generateXSLTFile( String rowExpandNode, String[]
checkedNodes, AsyncCallback callback );
}
====================================================

I hope these would be useful enough. I'm quite eager to know what's
wrong.
Welcome to ask more info if neccessary. Thanks.


sbbg

unread,
Jun 25, 2007, 3:27:12 AM6/25/07
to Google Web Toolkit
Ooops, I feel awfully sorry to inform that this is a problem of server
side code.
I forgot to ask the server side class to implements the interface.
Sorry to bothering you all...

Gee...

rusty

unread,
Jul 10, 2007, 8:39:23 PM7/10/07
to Google Web Toolkit
Just in case people come across this after a Google search: I too had
this problem, after refactoring some of my code. I was implementing
the right interface, but my service class was still pointing to the
old one, which I forgot to delete in my refactoring haste. Changing
the import fixed it.

haremyak

unread,
Jul 20, 2007, 12:35:02 PM7/20/07
to Google Web Toolkit
I caught the same bug.

Environment: GWT module that uses RPC, Tomcat 5.5, %CATALINA_HOME%/
shared/lib/gwt-user-1.4.10.jar.
Resulted exception message: "This application is out of date, please
click the refresh button on your browser". Server response contains a
message: "Could not locate requested interface 'MyServiceInterface' in
default classloader".

Solution: remove gwt-user library from shared libraries.

Explanation:
- read "how to" about tomcat class loaders -
http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html
- analize RPC::getClassFromSerializedName(serializedName) source
- GWT RPC tries to load class for name through "Common" class loader,
while it should use "Webapp" class loader through class provided from
RPC::decodeRequest(encodedRequest, class)

I hope GWT developers will fix this bug.

Cameron Taggart

unread,
Jul 24, 2007, 9:32:40 PM7/24/07
to Google Web Toolkit

I'm getting this same error message and I'm having trouble narrowing
down the problem. Does anyone have an example of unit testing GWT
serialization?

cheers,
Cameron

meng

unread,
Jul 24, 2007, 9:38:32 PM7/24/07
to Google Web Toolkit
make sure your return object is isserizable and you have made the
correct gwt annotation

in my case, i annotated a method to return a List of object A, but in
actual fact i returned a List of B, though B is also
isserizable.......after i corrected the annotation, ""This application
is out of date, please click the refresh button on your browser" was
gone....

Cameron Taggart

unread,
Jul 25, 2007, 2:58:19 PM7/25/07
to Google Web Toolkit
Thanks! I had the incorrect gwt annotation. It was returning an
array and I forgot the "[]" in the @gwt.typeArgs annotation.

danael

unread,
Jul 26, 2007, 6:37:27 PM7/26/07
to Google Web Toolkit
Just in case somebody finds this error while using a paremetrized
Map.

The annotaion in my code was as follows:
@gwt.typeArgs <the.path.classA, java.util.List>

when, in fact, should have been:
@gwt.typeArgs <the.path.classA, java.util.List<the.path.clasB>>

The first one gives the quite meaningful error: "This application is


out of date, please click the refresh button on your browser"

My mistake. If anyone can learn from it, it will be worth the trouble.

Danael

algesten

unread,
Aug 18, 2007, 7:53:27 AM8/18/07
to Google Web Toolkit

1.4 also seems to be very picky in that only ArrayList subtype of List
is serialized properly.

I encountered this problem with the following:

-------
/**
* @gwt.typeArgs <java.lang.String>
*/
public List getWorkspaces();
--------

and in the implementation I returned:

public List getWorkspaces() {
LinkedList l = new LinkedList();
l.add( "foo" );
return l;
}

quite certain 1.3 managed to solve this case. AFAIK it's only client
side ArrayList is the only subtype of List used, can't remember
reading the same restriction applies to server side.

Miguel Méndez

unread,
Aug 20, 2007, 10:32:40 AM8/20/07
to Google-We...@googlegroups.com
Hi Algesten,

Unless you were using something like Dozer, this would not have worked in 1.3.  The server can use LinkedList; it just can't return it to the client because our JRE classes do not support it.

Cheers,
Message has been deleted

Gerard Toonstra

unread,
Aug 20, 2007, 2:32:47 PM8/20/07
to Google Web Toolkit
If you upgraded from 1.3.3 to 1.4, it might be due to the cached
application that is still there.

I believe 1.4.10 uses this in the *.html file:

<script language='javascript'
src='com.company.App.nocache.js'></script>

1.3.x used the gwt.js script with the META tag at the top.

It's probably that part of the 1.3 app is still cached in the browser,
but you recompiled and changed interfaces and
this certainly would cause a problem at the client side.

This error should go away if you use the 1.4 method of setting the GWT
app in the HTML.

G>

Sumit Chandel

unread,
Aug 21, 2007, 2:13:07 PM8/21/07
to Google-We...@googlegroups.com
Hi everyone,

I'm glad to see that everyone's figured out the solution to their problem. Most of these problems occurred because our members forgot to update their client code with the new GWT 1.4.59 RC2 changes. For future reference, check out the release notes for new breaking changes that developers will need to look out for when upgrading from 1.3 to 1.4 that caused some the problems our members encountered on this thread.

GWT 1.4.59 RC2 release notes:
http://code.google.com/webtoolkit/releases/release-notes-1.4.59.html

@sbbg:
Don't feel too bad about forgetting to have your service implementation implement your service interface. We've had other users who ran into the same problem. The good thing is that we've now added logging to the hosted mode client when this occurs so that it's much easier to notice.

Thanks,
-Sumit Chandel
Reply all
Reply to author
Forward
0 new messages