Hey I just want to retrieve a list of subjects, and I receive this
exception:
GRAVE: javax.servlet.ServletContext log: Exception while dispatching
incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'org.datanucleus.store.appengine.query.StreamingQueryResult' was not
included in the set of types which can be serialized by this
SerializationPolicy or its Class object could not be loaded.
Here's the implementation of the method I called in RCP, aswell as the
entity class and the method call.
(server side)
--
public List<Subject> getSubjects() throws SubjectNotFoundException,
NullParameterException, GeneralException {
List<Subject> list;
try {
String sql = "SELECT p FROM Subject p";
list = entityManager.createQuery(sql).getResultList();
} catch (Exception e) {
throw new GeneralException("Exception in method getSubjectes: "
+ e.getMessage());
}
if (list == null || list.isEmpty()) {
throw new SubjectNotFoundException("Subject not found in method
getSubjectes");
}
return list;
}
(client side)
--
@Entity
@Table(name = "subject")
public class Subject implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String content;
private int visible;
...setters and getters..
}
and here's when I call the method ( in the onload() ).
AsyncCallback<List<Subject>> callback = new AsyncCallback<List<Subject>>()
{
public void onFailure(Throwable caught) {
throw new UnsupportedOperationException("Not
supported yet.");
}
public void onSuccess(List<Subject> result) {
subjectToString.setText("se cargaron todos los
temas");
}
};
crudEJB.getSubjects(callback);
Please I need some help. Ive read a workaround with DTO, but its not well
explained, besides everybody complains is a bad habit to do it that way (the
threads I found were talked 2 years ago, there must be something better
nowadays)
Cheers.
Kido
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" 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-appengine-java?hl=en.