The problem is likely exactly what you describe here: "but the GWT
compiler does not find those subclasses."  More specifically, those
classes aren't part of the gwt jre emulation, so that's why you're
having problems.

For the unmodifiable list, I'd just suggest not sending your list
through that filter.  If you need that functionality, you'll have to
create your own implementation.

For the empty list, I'm not really understanding the point.  Couldn't
you just return "new ArrayList()"?  I know that ArrayList is emulated,
so it would work.

On Mar 8, 7:06 am, mmoossen <[email protected]> wrote:
> Dear all!
>
> i want to serialize a bean that has a field of type java.util.List<T>
> but while serializing i get following error message:
>
> com.google.gwt.user.client.rpc.SerializationException: Type
> 'java.util.Collections$UnmodifiableRandomAccessList' was not included
> in the set of types which can be serialized by this
> SerializationPolicy or its Class object could not be loaded. For
> security purposes, this type will not be serialized.: instance = [...]
>
> i think the problem is that on the server i use
> Collections.unmodifiableList(..) or Collections.emptyList(..) to
> populate that field, but the GWT compiler does not find those
> subclasses.
>
> any idea?
>
> thanks in advance
> Michael

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