Yes, sorry for my crap code. I've replaced all my anonymous objects and it works now. Thank you for your help.
On 1 oct, 11:44, olivier nouguier <olivier.nougu...@gmail.com> wrote: > Sorry, not easy to read java code in mail ... > > I think your anonymous array list are not (GWT) serializable. > > Indeed, you seem to use array list in a very strange way... > > Please try to replace: > final Article b = new Article(0, "Title 2", new ArrayList<String>() > {{add("J2EE");add("eclipse");}}, "some content"); > > By: > ArrayList<String> list = new ArrayList<String>(); > list.add("J2EE"); > list.add("Eclipse"); > final Article b = new Article(0, "Title 2", list, "some content"); > > On Thu, Oct 1, 2009 at 11:38 AM, olivier nouguier < > > > > olivier.nougu...@gmail.com> wrote: > > Hi, > > What is "'fr.km.server.KMServiceImpl$5" this anonimous class ? > > What is this method "add(...)" it's seem to produce a wrapper on Article > > classes ? > > > On Thu, Oct 1, 2009 at 11:17 AM, Richard <richard.fa...@gmail.com> wrote: > > >> Hi All, > > >> I've tried my first GWT RPC project without success. I think I' > >> missing something but I don't find what. Can you help me finding > >> what's wrong ? > > >> =========== The exception =========== > >> 1 oct. 2009 11:06:18 > >> com.google.appengine.tools.development.ApiProxyLocalImpl log > >> SEVERE: [1254387978424000] javax.servlet.ServletContext log: Exception > >> while dispatching incoming RPC call > >> com.google.gwt.user.client.rpc.SerializationException: Type > >> 'fr.km.server.KMServiceImpl$5' 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. > > >> ===========My model =============== > >> package fr.km.client.model; > > >> import java.util.ArrayList; > > >> import com.google.gwt.user.client.rpc.IsSerializable; > > >> public class Article implements IsSerializable { > >> private int id; > >> private String title; > >> private ArrayList<String> tags; > >> private String content; > > >> public Article() {} > > >> public Article(int id, String title, ArrayList<String> tags, String > >> content) { > >> this.id = id; > >> this.title = title; > >> this.tags = tags; > >> this.content = content; > >> } > > >> public int getId() { > >> return id; > >> } > > >> public String getTitle() { > >> return title; > >> } > > >> public ArrayList<String> getTags() { > >> return tags; > >> } > > >> public String getContent() { > >> return content; > >> } > > >> } > > >> =============My RPC Impl ============= > >> public class KMServiceImpl extends RemoteServiceServlet implements > >> KMService { > > >> public ArrayList<Article> findArticles(String keywords) { > >> final Article a = new Article(0, "Title 1", new > >> ArrayList<String>() > >> {{add("J2EE");add("eclipse");}}, "some content"); > >> final Article b = new Article(0, "Title 2", new > >> ArrayList<String>() > >> {{add("J2EE");add("eclipse");}}, "some content"); > >> final Article c = new Article(0, "Title 3", new > >> ArrayList<String>() > >> {{add("J2EE");add("eclipse");}}, "some content"); > >> final Article d = new Article(0, "Title 4", new > >> ArrayList<String>() > >> {{add("J2EE");add("eclipse");}}, "some content"); > > >> return new > >> ArrayList<Article>(){{add(a);add(b);add(c);add(d);}}; > >> } > >> } > > > -- > > A coward is incapable of exhibiting love; it is the prerogative of the > > brave. > > -- > > Mohandas Gandhi > > -- > A coward is incapable of exhibiting love; it is the prerogative of the > brave. > -- > Mohandas Gandhi --~--~---------~--~----~------------~-------~--~----~ 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 google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---