I'm giving the first steps with the GWT Request Factory and I'm having an occasionally exception. What I find strange is that it doesn't happen in every server request...just sometimes.
The exception is:
> Caused by: java.lang.IllegalArgumentException: Something other than a Java object was returned from JSNI method
> '@com.google.web.bindery.autobean.gwt.client.impl.JsniCreatorMap::invoke(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/lang/Object;Ljava/lang/Object;)':
> JS value of type boolean, expected java.lang.Object
I get an error when I call:
> Request<List<ConcertProxy>> findAll();
Which is implemented like this:
public static List<Concert> findAll()
{
Objectify ofy = ObjectifyService.begin();
List<Concert> concerts = ofy.query(Concert.class).limit(100).order("-id").list();/* this dumps to memory */
return concerts;
}
Nothing to do with RequestFactory, this is a Chrome DevMode Plugin bug. Google recommends using Firefox (or IE) for DevMode: http://code.google.com/p/google-web-toolkit/issues/detail?id=5778#c65