简体   繁体   中英

JBAS014134: EJB Invocation failed

List results= sessionFactory.getCurrentSession().createQuery("from org.gencat.gimah.dao.GimahCobramentTargeta ct where ct.expEcon.id=: idEE and ct.cobrament is null ")
                    .setParameter("idEE", idEE)
                    .list();

JBAS014134: EJB Invocation failed on component Expedients for method public abstract java.util.List org.gencat.gimah.model.Expedients.doBuscarDetallExpeconAPartirGestio(long,java.lang.String,boolean) throws org.gencat.gimah.exception.GimahExcepcio,java.rmi.RemoteException: javax.ejb.EJBException: org.hibernate.HibernateException: could not locate named parameter [idEE]

There is an error in the parameter ct.expEcon.id=: idEE . It is incorrect to put a space after : . You need to use parameters by this way

ct.expEcon.id = :idEE

And, please, use more reasonable parameter's names. idEE is a bad choice, because of two neighbour capital letters E .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM