SerializationException: type not included in serializable type set

前端 未结 6 1894
既然无缘
既然无缘 2021-01-07 17:14

In my Google Web Toolkit project, I got the following error:

com.google.gwt.user.client.rpc.SerializationException: Type ‘your.class.Type’ was not included in the se

6条回答
  •  隐瞒了意图╮
    2021-01-07 17:18

    I have run into this problem, and if you per chance are using JPA or Hibernate, this can be a result of trying to return the query object and not creating a new object and copying your relavant fields into that new object. Check the following out, which I saw in a google group.

         @SuppressWarnings("unchecked") 
        public static List
    getForUser(User user) { List
    articles = null; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query query = pm.newQuery(Article.class); query.setFilter("email == emailParam"); query.setOrdering("timeStamp desc"); query.declareParameters("String emailParam"); List
    results = (List
    ) query.execute(user.getEmail ()); articles = new ArrayList
    (); for (Article a : results) { a.getEmail(); articles.add(a); } } finally { pm.close(); } return articles; }

    this helped me out a lot, hopefully it points others in the right direction.

提交回复
热议问题