On Thursday, 3 October 2013 23:15:22 UTC+2, Thomas Broyer wrote:
On Thursday, October 3, 2013 9:50:17 PM UTC+2, Manu Botija wrote:Hi,Please let me know if this is not the place for this kind of questions...I am using Objectify with RequestFactory. I have an objectify Entity called Entry with an attribute of type Ref<?>. Following Objectify recommendations, I declare the getter and setter for that kind of argument as:@Parent Ref<Topic> topic;
public Topic getTopic() {
return topic.get();
}
public void setTopic(Topic topic) {
this.topic = Ref.create(topic);
}
(Topic is an Entity as well)
Now on the client side I want to create a new Entry with some user content and attach to that Entry the Topic which I happen to have already in the client (brought it before with RequestFactory). So I do:
entry.setText(review); //an String
entry.setTopic(topic);
entryService.saveEntry(entry).
fire(new Receiver......)
However, I always receive a very weird null Exception on the Receiver's onFailure:
- getMessage gives: Error: Server Error: null
- stacktracestring is null
- requestContext is com.mmr.shared.service.
EntryServiceImpl@5d95bef6, which is my service implementation but I have put a breakpoint and it never gets in. When I remove the setTopic call, the service succeeds (as long as I deal with the then null argument). So I believe the problem is in the setTopic but I don't know how to solve it neither how to workaround.
Can you help me? I am a newbie to GWT and Web programming in general but this seems to me like pretty basic functionality in order to add items to a graph.
Thanks!
Something (probably your setter) is throwing a NullPointerException ('null' is a symptom of a NPE without specific message).Set a breakpoint in DefaultExceptionHandler#createServerFailure (on server-side) so you have access to the exception with its stacktrace.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment