I'm doing almost the exact same thing as Arthur and having the exact same problem. I'd prefer not to implement IsSerializable as my model is used in various places and I really don't want too tie it to GWT.
I'm using spring MVC in the same way (with similar modifications) and the serialisation problem is occurring inside the development shell, before I have even tried to deploy the project. It is a new project, started from scratch using gwt 1.5.3. No previous version compiles or anything similar. I'm building in maven using com.totsp.gwt:maven-googlewebtoolkit2- plugin and getting no compilation errors or warnings. The first sign of a problem I get is when I try to return a very simple Instance of a Serializable class and I get: com.google.gwt.user.client.rpc.SerializationException: Type 'com.xxx.MyClass' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer. I'll keep plugging away at this and post if I come up with an answer, but any comments with some insight into this would be very welcome. On Jan 14, 2:28 am, "Arthur Kalmenson" <arthur.k...@gmail.com> wrote: > Hi Sumit, > > I'm not using any third party libraries. I basically followed this > blog post:http://blog.digitalascent.com/2007/11/gwt-rpc-with-spring-2x_12.html > with a minor modification of making GwtRcpEndPointHandlerAdapter > implement ServletContextAware and not replacing '.' with '/'. I found > that when I tried to send custom java.io.Serializableobjects toSpringMVC, I > was getting an error saying the object is notserializable. When I switched > them to be IsSerializable, it magically > started working. I can try to recreate the issue if you want but it > really wasn't a big deal using IsSerializable instead. > > -- > Arthur Kalmenson > > On Mon, Jan 12, 2009 at 7:54 PM, Sumit Chandel <sumitchan...@google.com> > wrote: > > Hi Arthur, > > > I'm curious about why java.io.Serialization wouldn't work usingSpringMVC. > > Did that occur when trying to work withSpringMVC directly (i.e. no other > > third party library, such as GWT-SL)? I just want to make sure there wasn't > > anything introduce by the switch to java.io.Serializablethat would cause > > unexpected problems with other frameworks. > > > Thanks, > > -Sumit Chandel > > > On Sun, Jan 11, 2009 at 3:47 PM, Arthur Kalmenson <arthur.k...@gmail.com> > > wrote: > > >> If you're integrating withSpringMVC, I found problems using > >> java.io.Serializable. Switching to IsSerializable fixed the problems. > > >> -- > >> Arthur Kalmenson > > >> On Fri, Jan 9, 2009 at 7:17 AM, tomekp <tom...@mailinator.com> wrote: > > >> > hi, > >> > According to GWT documentation (http://code.google.com/support/bin/ > >> > answer.py?hl=en&answer=78126), it should be possible to use > >> > java.io.Serializableinstead of IsSerializable interface. > >> > But for me even the simpliest classes cannot be serialized when I > >> > switch from IsSerializable toSerializable. > >> > I checked that the automatically generated "whitelist" contains right > >> > entries. I checked the hosted and web mode. > >> > I always get the following exception: > > >> > Caused by: com.google.gwt.user.client.rpc.SerializationException: Type > >> > 'ch.systemsx.cisd.openbis.generic.client.web.client.dto.X' 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. > >> > at > > >> > com.google.gwt.user.server.rpc.impl.LegacySerializationPolicy.validateDeserialize > >> > (LegacySerializationPolicy.java:123) > >> > at > > >> > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize > >> > (ServerSerializationStreamReader.java:490) > >> > at > > >> > com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject > >> > (AbstractSerializationStreamReader.java:61) > >> > at > >> > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader > >> > $ValueReader$8.readValue(ServerSerializationStreamReader.java:131) > >> > at > > >> > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue > >> > (ServerSerializationStreamReader.java:372) > >> > at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:287) > >> > ... 35 more > > >> > For some reason always the LegacySerializationPolicy class is used. > >> > I'm using GWT 1.5. > >> > Any ideas what can be wrong? Has anyone succeeded to useSerializable > >> > interface? > > >> > Greetings > >> > Tomek --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---