我正在使用 GWT 请求工厂迈出第一步,但我偶尔会遇到异常。我觉得奇怪的是它不会发生在每个服务器请求中……只是有时。
例外是:
> 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
我打电话时遇到错误:
> Request<List<ConcertProxy>> findAll();
这是这样实现的:
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;
}