persistence@glassfish.java.net

Re: exception occurred while creating a query in entitymanager

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Sun, 03 Aug 2008 22:53:49 -0400

Can you provide the stack trace for the exception and the full exception
message?
--Gordon

chflb wrote:
> hello all,
> please do you know what is wrong in my query,in fact i have executed it in
> oracle and it works,
> but while running my project this message appeared" exception occurred while
> creating a query in entitymanager".
> this is the procedure;
>
> public void Opinfo() {
> EntityManager em = getEntityManager();
> try {
> Query q = em.createQuery("select sum(o.montant) from Operation
> o,Transaction t,Caisse c where
> (o.cod_caisse=c.code_caisse)and(t.sens='C')and(o.cod_transac=t.code)");
> infoArrete.setTotD((BigInteger) q.getSingleResult()) ;
> } finally {
> em.close();
> }
> }
>
> thanks,
>
>