在使用相同的查询参数执行多个 SYNCHRONOUS 请求时,我遇到了GAE问题。
我的查询:
Query<Movimentacao> q = ofy().query(Movimentacao.class).ancestor(ANCESTOR_KEY);
q.filter("codStatus =", MyEnum.ENVIADO);
q = q.order("datMovRegistrada").limit(1);
return q.get();
经过一些电话后,我收到了这个错误:
Caused by: java.lang.IllegalArgumentException: invalid handle: 5736689025196469674
at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:45)
at com.google.appengine.api.datastore.DatastoreApiHelper$AsyncCallWrapper.convertException(DatastoreApiHelper.java:74)
at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:96)
at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:88)
at com.google.appengine.api.datastore.FutureHelper.getInternal(FutureHelper.java:75)
at com.google.appengine.api.datastore.FutureHelper.quietGet(FutureHelper.java:35)
at com.google.appengine.api.datastore.BaseQueryResultsSource.getIndexList(BaseQueryResultsSource.java:152)
at com.google.appengine.api.datastore.BaseQueryResultsSource.loadMoreEntities(BaseQueryResultsSource.java:181)
at com.google.appengine.api.datastore.BaseQueryResultsSource.loadMoreEntities(BaseQueryResultsSource.java:164)
at com.google.appengine.api.datastore.QueryResultIteratorImpl.ensureLoaded(QueryResultIteratorImpl.java:147)
at com.google.appengine.api.datastore.QueryResultIteratorImpl.hasNext(QueryResultIteratorImpl.java:64)
at com.googlecode.objectify.util.TranslatingIterator.hasNext(TranslatingIterator.java:29)
at com.googlecode.objectify.impl.QueryImpl.get(QueryImpl.java:389)
at br.com.sulamerica.susis.mecsas.web.model.repositorio.MovimentacaoRepositoryImpl.getMovimentacaoSincronia(MovimentacaoRepositoryImpl.java:153)
at br.com.sulamerica.susis.mecsas.web.service.ManutencaoMovimentacaoServiceImpl.retornaMovimentacaoFila(ManutencaoMovimentacaoServiceImpl.java:1532)
at br.com.sulamerica.susis.mecsas.web.controller.TaskQueueController.recuperaMovimentacao(TaskQueueController.java:126)
Aby想到为什么会这样?
我正在使用Objectify 3.1。
谢谢!
答案 0 :(得分:0)
我不知道&#34;无效句柄&#34;意思是,但我注意到您发布的代码中的q.filter(...)
不是作业。它必须像其他人一样q = q.filter(...)
。
我无法判断这是一个错字还是一个真正的问题。