I am not a GWT developer, but i might have a hint on what is wrong. Marking a class with java.io.Serializable is not enough to make the class serializable, you also have to obey the rules specified here: http://java.sun.com/javase/6/docs/api/java/io/Serializable.html In your example i see a missing the public no-arg constructor, that is required if you reed the specification.
GWT supports both the IsSerializable marker and the java.io.Serializable, none of them are deprecated. Also from what i see here, GWT is also checking for the rules specified for java.io.Serializable before it marks a class as serializable. IsSerializable is not requiring a public no-arg constructor, therefore it works in your example. Jesper On Jan 17, 9:25 am, Paul Grenyer <[email protected]> wrote: > Hi All > > I was under the impression that IsSerializable was depreciated in > favor of Serializable. However, I've just created a new exception > type: > > package uk.co.marauder.usermanager.client; > > import com.google.gwt.user.client.rpc.IsSerializable; > > public class ServerSideException extends RuntimeException implements > IsSerializable > { > private static final long serialVersionUID = -1005766244333245684L; > > @SuppressWarnings("unused") > private ServerSideException() > {} > > public ServerSideException(Throwable t) > { > super(t); > } > > } > > and it won't serialize across the RPC boundry unless it implements > IsSerializable, Serializable doesn't work. > > -- > Thanks > Paul > > Paul Grenyer > e: [email protected] > b: paulgrenyer.blogspot.com
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
