使用相同的查询参数执行多个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)


阿比思考为什么会这样?

我正在使用Objectify 3.1。

谢谢 !

最佳答案

我不知道“无效的句柄”是什么意思,但是我确实注意到,您发布的代码中的q.filter(...)不是分配。它必须像其他q = q.filter(...)一样。

我不知道这是拼写错误还是真正的问题。

09-25 21:47