I'm getting this error when my RPC returns a list of a custom object:Type 'org.datanucleus.sco.backed.List' 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.
--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
@PersistenceCapable(detachable="true")
detached = pm.detachCopy(employee);
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/ikusuY9VjW0J.
@Persistent(defaultFetchGroup = "true", dependentElement = "true")
private LinkedHashSet<CourseJdo> courses;
private LearningPlanData[] queryData(LearningPlanDataFilter filter) {
String qfilter = null;
// filter a batch of ids
List<Key> keysList = null;
if (filter.getUseIds() == true) {
keysList = getFilterForIds(filter);
if (keysList != null) {
qfilter = ":keys.contains(key)";
}
if (keysList == null || keysList.size() == 0) {
return null;
}
}
ArrayList<LearningPlanData> a = new ArrayList<LearningPlanData>();
PersistenceManager pm = sp.getPersistenceManager();
try {
Query q = pm.newQuery("select from " + LearningPlanJdo.class.getName());
if (qfilter != null) {
q.setFilter(qfilter);
}
q.setRange(filter.getRangeStart(), filter.getRangeFinish());
List<LearningPlanJdo> ids = null;
if (filter.getUseIds() == true && keysList != null) {
ids = (List<LearningPlanJdo>) q.execute(keysList);
} else {
ids = (List<LearningPlanJdo>) q.execute();
}
Iterator<LearningPlanJdo> itr = ids.iterator();
while (itr.hasNext()) {
LearningPlanJdo j = itr.next();
if (j != null) {
j.getData();
LearningPlanJdo detatched = pm.detachCopy(j);
a.add(detatched.getData());
}
}
q.closeAll();
} catch (Exception e) {
e.printStackTrace();
log.log(Level.SEVERE, "", e);
} finally {
pm.close();
}
if (a.size() == 0) {
return null;
}
LearningPlanData[] r = new LearningPlanData[a.size()];
a.toArray(r);
return r;
}