Mutiple fetches on GAE causing invalid handle

84 views
Skip to first unread message

Leonardo Pinheiro Ferrari

unread,
Mar 3, 2015, 6:45:24 AM3/3/15
to google-a...@googlegroups.com

I'm having trouble with GAE when doing several SYNCHRONOUS requests with the same query parameters.

My query:

Query<Movimentacao> q = ofy().query(Movimentacao.class).ancestor(ANCESTOR_KEY);
        q.filter("codStatus =", MyEnum.ENVIADO);
        q = q.order("datMovRegistrada").limit(1);
        return q.get();
After some calls I'm getting this error:

    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 thoughts why this is happening ?

I'm using Objectify 3.1.

Thanks !

Mario

unread,
Mar 3, 2015, 9:41:35 AM3/3/15
to google-a...@googlegroups.com
Hello Leonardo,

I'd suggest you to write this technical trouble-shooting question in Stackoverflow. There are two main reasons for this:

  1. There are more users there that could help you.
  2. Once your question is answered, it would be easier to find in the future by other users.
Thanks.

Mario

Google Cloud Platform Support

Leonardo Pinheiro Ferrari

unread,
Mar 3, 2015, 10:21:59 AM3/3/15
to google-a...@googlegroups.com
Mario,

Thank you for helping ! I already have, I'm kinda desperate with this issue so I decided to post both here and on SO.
Hope someone can help me !

Thank you
Reply all
Reply to author
Forward
0 new messages