GWT 2.0 - com.google.gwt.user.client.rpc.IsSerializable is mandatory again?

7,364 views
Skip to first unread message

Dop Sun

unread,
Dec 11, 2009, 7:27:41 PM12/11/09
to Google Web Toolkit
While I upgraded my project settings to 2.0 (via Google Eclipse
Plugin), and have a runtime error while running in development mode:

com.google.gwt.user.client.rpc.SerializationException: Type 'xxx' was
not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and
did not have a custom field serializer. For security purposes, this
type will not be deserialized.

I believe this is resolved while GWT since 1.5, but it comes back 2.0
again?

John V Denley

unread,
Dec 12, 2009, 2:28:40 PM12/12/09
to Google Web Toolkit
Yup, Ive got the same problem having just upgraded to 2.0...... GRRRR

John V Denley

unread,
Dec 12, 2009, 2:30:10 PM12/12/09
to Google Web Toolkit
Actually, sorry, not sure ive got the SAME problem, I have:

"com.google.gwt.user.client.rpc.SerializationException: Type
'com.ideba.net.client.LoginInfo' was not assignable to
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a
custom field serializer.For security purposes, this type will not be
serialized.: instance = com.ideba.net.client.LoginInfo@a59c12"

On Dec 12, 12:27 am, Dop Sun <dop...@gmail.com> wrote:

John V Denley

unread,
Dec 12, 2009, 3:47:26 PM12/12/09
to Google Web Toolkit
FYI, I fixed this as follows (the commented lines were the original
code):

//import java.io.Serializable;
import com.google.gwt.user.client.rpc.IsSerializable;

//public class LoginInfo implements Serializable {
public class LoginInfo implements IsSerializable {


On Dec 12, 12:27 am, Dop Sun <dop...@gmail.com> wrote:

Dop Sun

unread,
Dec 12, 2009, 8:12:51 PM12/12/09
to Google Web Toolkit
Thx John:

The way I fixed it is a little bit different:
I deleted all files generated by old compiler, and then, the problem
disappeared. I guess, the problem is because the new compiler is
different from the new compiler.

Cheers.
Dop

tekgrunt

unread,
Dec 12, 2009, 9:57:23 PM12/12/09
to Google Web Toolkit
I am losing my mind... I just upgraded to GWT 2.0 on OSX 10.5 using
Eclipse 3.5 App Engine SDK 1.2.8 and previously working server calls
are now not working. When the application starts it grabs some data
from the server and this is still working. When I try to have a user
login I get the following error:

[WARN] remoteProcedureServiceImpl: An
IncompatibleRemoteServiceException was thrown while processing this
call.
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
Invalid type signature for
ca.beloud.smallFeet.emissionCalculator.client.objects.User
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:308)

which is preceeded by...

Caused by: com.google.gwt.user.client.rpc.SerializationException:
Invalid type signature for
ca.beloud.smallFeet.emissionCalculator.client.objects.User
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.validateTypeVersions
(ServerSerializationStreamReader.java:857)


I have been at this all day and just can't seem to resolve it. I have
tried switching from Serializabe to IsSerializable but having no luck.

Any suggestions would be oh so greatly appreciated.

Best,

Christopher.

tekgrunt

unread,
Dec 12, 2009, 10:00:32 PM12/12/09
to Google Web Toolkit
@Dop Sun

Could you tell me which files were/are created by the old compiler? I
have tried cleanign and refreshing a bunch of stuff but maybe I am
missing something.

Thanx.

On Dec 12, 5:12 pm, Dop Sun <dop...@gmail.com> wrote:

John

unread,
Dec 11, 2009, 10:19:04 PM12/11/09
to Google Web Toolkit
I have the same error in Hosted Mode. Production is fine. Making all
my types implement IsSerializable fixes the problem, but I'd really
rather not have to tie all my objects to GWT like that.

P.S: Maybe unrelated, I get this warning with the IsSerializable fix.
I'm getting multiple .rpc files in my build output, i.e. the directory
Hosted Mode uses. Only 1 .rpc file makes it to the war file, so that's
probably why it doesn't show up in production.

2009-12-11 19:10:13 ERROR org.apache.catalina.core.ContainerBase.
[Catalina].[localhost].[/jkurkowski] - servletGWT: WARNING: Failed to
get the SerializationPolicy '864B08CED5452C2F235E67317E0E0948' for
module 'http://localhost:8080/jkurkowski/com.foo.module.Module/'; a
legacy, 1.3.3 compatible, serialization policy will be used. You may
experience SerializationExceptions as a result.

Sorinel C

unread,
Dec 13, 2009, 4:11:55 PM12/13/09
to Google Web Toolkit
When a new version comes these are the standard steps to do:
1 - put the jars
2 - perform a full rebuild of the application
3 - clean up the browser cache
4 - clean up the "temp" folder, where the GWT is generating the
compilation crap...
5 - run the application :-))

Cheers,
Sorinel CRISTESCU

Addy

unread,
Dec 14, 2009, 9:17:04 AM12/14/09
to Google Web Toolkit
I cleanup after every build but since converting to 2.0, I started
encountering intermittent Serialization exceptions even in production.
I had to switch back 1.7.
For production use, cleaning up browser cache is not an option as I
cant tell all my users to do so.
I guess I will have to wait a bit for this release to be stable to
switch to 2.0 for production use.
Addy
http://checkAppointments.com

Alexander De Leon

unread,
Dec 16, 2009, 9:19:18 PM12/16/09
to Google Web Toolkit
For now I'm using the GWT compile button of the eclipse plugin to
force a proper GWT 2,0 compile. This seems to work for me.
The problem must be that some older GWT compiler is been executed
somehow.

Alex

On Dec 14, 3:17 pm, Addy <adityaka...@gmail.com> wrote:
> I cleanup after every build but since converting to 2.0, I started
> encountering intermittent Serialization exceptions even in production.
> I had to switch back 1.7.
> For production use, cleaning up browser cache is not an option as I
> cant tell all my users to do so.
> I guess I will have to wait a bit for this release to be stable to
> switch to 2.0 for production use.

> Addyhttp://checkAppointments.com

rla...@googlemail.com

unread,
Dec 20, 2009, 10:38:04 AM12/20/09
to Google Web Toolkit
Hi all

i just spent more than a whole day on this issue. Do somebody why this
problem occurs?

I tried almost all solutions discussed on this thread. But nothing
seems to work.
here is my error message:

Type 'cm.bao.sms.ui.web.gwt.client.wrapper.BooleanWrapper' was not
included in the set of types which can be serialized by this
SerializationPolicy or its Class object could not be loaded. For
security purposes, this type will not be serialized.: instance = false

Since i used an instance of Boolean before, here the previous error
message was

Type 'cm.bao.sms.ui.web.gwt.client.wrapper.Boolean' was not included
in the set of types which can be serialized by this
SerializationPolicy or its Class object could not be loaded. For
security purposes, this type will not be serialized.: instance = false

The Service method signature look like this;

public <T extends Response<V>, V extends Serializable, D extends
Serializable> T execute(
Action<T, V, D> action);

The Boolean Wrapper class definition:

public final class BooleanWrapper implements Serializable,
IsSerializable {

/**
*
*/
private static final long serialVersionUID = -5103012029222801034L;

private boolean value;

public BooleanWrapper() {
super();
}

public BooleanWrapper(boolean v) {
this.value = v;
}

public boolean getValue() {
return value;
}

public String toString() {
return ""+ value;
}

}

rla...@googlemail.com

unread,
Dec 22, 2009, 6:12:45 PM12/22/09
to Google Web Toolkit
Hi all!

I tested this behavior the last days, and remarked that this generated
rpc file contains entries (as row) with all types that could be use
during rpc call, all with "false" after it. It's not possible to set
it back to true, since the gwt.rpc file is generated at any running.

Is there a possibiliy to take control on the generation of this file.
For example with compiler variables.

Rodrigue Lagoue

Reply all
Reply to author
Forward
0 new messages