Moreover, Set, just like List, Object etc. is NOT Serializable. If the interface does not extend Serializable, a serialization error is thrown. The fact of Set not being serializable is all but obvious, I think we all forgot this problem with RPC.
Btw, this behavior is documented (in a couple of lines at the bottom of https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication#DevGuideSerializableTypes) but interface based RPC worked fine, despite documentation stating the opposite, until 2.2 i guess, so some of your applications may just step into this problem when you update your GWT release. Regards Lorenzo On Apr 13, 5:15 pm, Philippe Lhoste <[email protected]> wrote: > On 13/04/2012 09:08, Vincenz M ssenb ck wrote: > > > private Set<BestellpositionDTO> alBestellpositionDTO; > > One of the first advices I got for making DTOs is to avoid using interfaces > in them. > GWT will try and generate JavaScript for all the interface implementations it > can find in > the classpath, which is rather costly, and can fail if it finds a > non-serializable > implementation... > In short, use HashSet or similar instead of Set. > > -- > Philippe Lhoste > -- (near) Paris -- France > -- http://Phi.Lho.free.fr > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 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.
