Quando uso do debug do eclipse e paro a execução após o comando
lisTemp =q.getResultList();
ele traz uma resposta ou o objeto vazio.
Quando executo sem parada ele não dá erro mais
o objeto fica com essa mensagem com.sun.jdi.InvocationException occurred.
Alguém sabe o que pode estar acontecendo?
abaixo o método que estou com problema:
public List<RestaUmDt> getListaRecordes(String nivel, String posicao){
List<RestaUmDt> lisTemp=null;
Query q = null;
EntityManager em = EMFService.get().createEntityManager();
int inNivel = stringToInt(nivel, 0);
int inPosicao = stringToInt(posicao, 0);
try {
q = em.createQuery("select count(1) from RestaUm m WHERE
m.Nivel=:nivel ");
q.setParameter("nivel", inNivel );
this.totalRegistroConsulta = ( (Integer) q.getSingleResult()
).intValue();
int inInicio =
(inPosicao*Configuracao.TamanhoRetornoConsulta);
q = em.createQuery("select m from RestaUm m WHERE
m.Nivel=:nivel ORDER BY m.Nivel, m.Pontos desc");
q.setParameter("nivel", inNivel );
q.setFirstResult(inInicio);
q.setMaxResults(Configuracao.TamanhoRetornoConsulta);
lisTemp =q.getResultList();
// q.wait(3000);
//System.out.println("found:" + lisTemp.size() + " " +
this.totalRegistroConsulta );
} catch(Exception e) {
e.printStackTrace();
} finally {
em.close();
}
return lisTemp;
}
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/VwwQn0WbgJYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.