I believe the server is trying to persist the "enhanced" version of the serializable class, which makes it appear as if the class has changed, triggering the out-of-date exception. I saw something similar before switching to separate persistable data objects and DTOs.
2009/5/12 Miguel Méndez <[email protected]>: > What if you try to have it not be persistable (comment out the persistence > annotations, rebuild, and return a dummy one that was not instantiated by > the ORM code)? I wonder if this is the ORM and GWT-RPC incompatibility. > > On Tue, May 12, 2009 at 1:00 PM, Pavel Byles <[email protected]> wrote: >> >> I suspect it has something to do with the object I am returning. >> >> When I use the same service to return a String or a simple class that >> contains a String everything works fine. >> >> But when I try to return instances of Country then I get the error. >> >> Any ideas why this happens? >> Here is the Country class: >> >> import java.io.Serializable; >> >> import javax.jdo.annotations.IdentityType; >> import javax.jdo.annotations.PersistenceCapable; >> import javax.jdo.annotations.Persistent; >> import javax.jdo.annotations.PrimaryKey; >> >> @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = >> "true") >> public class Country implements Serializable { >> private static final long serialVersionUID = -1L; >> >> @PrimaryKey >> @Persistent >> private String name; >> >> @Persistent >> private float latitude; >> >> @Persistent >> private float longitude; >> >> public Country () { >> >> } >> >> public Country (String name, float latitude, float longitude) { >> this.name = name; >> this.latitude = latitude; >> this.longitude = longitude; >> } >> >> public String getName() { >> return name; >> } >> >> public void setName(String name) { >> this.name = name; >> } >> >> public float getLatitude() { >> return latitude; >> } >> >> public float getLongitude() { >> return longitude; >> } >> >> public void setLatitude(float latitude) { >> this.latitude = latitude; >> } >> >> public void setLongtiude(float longitude) { >> this.longitude = longitude; >> } >> } >> >> >> >> > > > > -- > Miguel > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
