I'm experiencing the same issues when having my signature defined as
void doIt(List<Foo<Bar>>> list). Bar cannot be serialized. Any hints
on how to work around this apart from adding dummy methods just to get
the type whitelisted?

/J

On 14 Aug, 22:42, pgraham <[email protected]> wrote:
> Hi all,
>
> I believe I have encountered a bug with gwt serialization and Maps.
>
> I have created a service with a single method that has an AbstractMap
> as its only parameter.
>
> public interface DataService extends RemoteService {
>
>     public ChartData getChartData(AbstractMap<FilterTypeDto,
> List<BaseDto>> filters);
>
> }
>
> When I invoke this method from the client side I get this error:
>
> org.sitebrand.report.gwt.dto.FilterTypeDto
>         at
> org.sitebrand.report.gwt.service.DataService_TypeSerializer.raiseSerializat­ionException
> (transient source for
> org.sitebrand.report.gwt.service.DataService_TypeSerializer:2403)
>         at
> org.sitebrand.report.gwt.service.DataService_TypeSerializer.serialize
> (Native Method)
>         at
> com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.seriali­ze
> (ClientSerializationStreamWriter.java:216)
>         at
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write­Object
> (AbstractSerializationStreamWriter.java:129)
>         at
> com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase­.serialize
> (Map_CustomFieldSerializerBase.java:49)
>         at
> com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer­.serialize
> (HashMap_CustomFieldSerializer.java:36)
>         at
> org.sitebrand.report.gwt.service.DataService_TypeSerializer.serialize
> (Native Method)
>         at
> com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.seriali­ze
> (ClientSerializationStreamWriter.java:216)
>         at
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write­Object
> (AbstractSerializationStreamWriter.java:129)
>         at org.sitebrand.report.gwt.service.DataService_Proxy.getChartData
> (transient source for
> org.sitebrand.report.gwt.service.DataService_Proxy:31)
>
> If I add a dummy method to the service that defines the type that is
> failing to serialize as a parameter (see example) then calls to the
> getChartData() method work.
>
> public interface DataService extends RemoteService {
>
>     public void bleh(FilterTypeDto dto);
>
>     public void getChartData(AbstractMap<FilterTypeDto, List<BaseDto>>
> filters);
>
> }
>
> Has anyone else encountered this and found a solution that doesn't
> involve cluttering your service interface?
>
> Cheers,
> Philip

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to