Indeed, turning the inner class to static was just the thing. The inner class was acting only as a bean anyway. And the more I think about it, the more I realize that I should be creating inner classes as static by default anyway ... perhaps this is how Java should have been spec'd in the first place.
Thanks *very* much ... a very big deal for us. On Sep 18, 8:14 am, Charlie Collins <[EMAIL PROTECTED]> wrote: > I am not sure of the status of this, but yes, there is an issue > related to that still > open:http://code.google.com/p/google-web-toolkit/issues/detail?id=811&q=in.... > > A non static inner class is probably a bit tricky (not impossible > though) for a source code analyzer/compiler to deal with. Try just > making it a top level class and see if that solves it. Or, if the > situation warrants, make Device a static inner class, that should work > too. > > On Sep 18, 4:19 am, Barry <[EMAIL PROTECTED]> wrote: > > > Hi, all ... > > > I have a GWT service that is trying to return a class > > GetDeviceListResult. This class contains an inner class Device. > > > When the client tries to call the service, the GWT serializer is > > invoked, and it fails to serialize the GetDeviceListResult class, > > saying that the inner class cannot be serialized. (In the example > > below, it's because of the presence of the xxx member.) > > > Are inner classes not serializable?? ... or am I just doing this > > wrong?? > > > My call is an Async call, if that matters. > > > Thanks! > > > ------------------ > > > The service has this declaration: > > public GetDeviceListResult getDeviceList(); > > > The offending GetDeviceListResult class (containing the Device inner > > class) is: > > > package org.paceproject.palms.browserproxy.client.messages; > > import com.google.gwt.user.client.rpc.IsSerializable; > > public class GetDeviceListResult implements IsSerializable { > > private class Device implements IsSerializable { > > public Device() { } > > } > > public Device xxx; > > public GetDeviceListResult() {} > > > } > > > The service itself is: > > > package org.paceproject.palms.browserproxy.server; > > mport org.paceproject.palms.browserproxy.client.DeviceService; > > import > > org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult; > > import com.google.gwt.user.server.rpc.RemoteServiceServlet; > > public class DeviceServiceImpl extends RemoteServiceServlet implements > > DeviceService { > > private static final long serialVersionUID = 1L; > > public GetDeviceListResult getDeviceList() { > > return new GetDeviceListResult(); > > } > > > } > > > This is the log: > > [DEBUG] Rebinding > > org.paceproject.palms.browserproxy.client.DeviceService > > [DEBUG] Invoking <generate-with > > class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/ > > > [DEBUG] Generating client proxy for remote service interface > > 'org.paceproject.palms.browserproxy.client.DeviceService' > > [DEBUG] Analyzing > > 'org.paceproject.palms.browserproxy.client.DeviceService' for > > serializable types > > [DEBUG] Analyzing methods: > > [DEBUG] public abstract > > org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult > > getDeviceList(java.lang.String studyID) > > [DEBUG] Return type: > > org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult > > [DEBUG] > > org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult > > [DEBUG] Analyzing the fields of type > > 'org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult' > > that qualify for serialization > > [DEBUG] public > > org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult.Device > > xxx > > [DEBUG] > > org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult.Device > > [ERROR] Type > > 'org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult.Device' > > was not serializable and has no concrete serializable subtypes > > [ERROR] Type > > 'org.paceproject.palms.browserproxy.client.messages.GetDeviceListResult' > > was not serializable and has no concrete serializable subtypes > > [ERROR] Deferred binding failed for > > 'org.paceproject.palms.browserproxy.client.DeviceService'; expect > > subsequent failures --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---