2010-07-09 09:47:38.935 ERROR <!--- 执行HQL语句失败:select t.mainorgan,t.dsffdate,sum(t.amount),sum(t.totalamt),sum(t.totalcnt),sum(t.amount1)from DSFF_FEE t where t.organid=0100100014 group by t.mainorgan,t.dsffdate order by t.dsffdate desc --->
org.springframework.orm.hibernate.HibernateQueryException: in expected: t [select t.mainorgan,t.dsffdate,sum(t.amount),sum(t.totalamt),sum(t.totalcnt),sum(t.amount1)from DSFF_FEE t where t.organid=0100100014 group by t.mainorgan,t.dsffdate order by t.dsffdate desc]; nested exception is net.sf.hibernate.QueryException: in expected: t [select t.mainorgan,t.dsffdate,sum(t.amount),sum(t.totalamt),sum(t.totalcnt),sum(t.amount1)from DSFF_FEE t where t.organid=0100100014 group by t.mainorgan,t.dsffdate order by t.dsffdate desc]
net.sf.hibernate.QueryException: in expected: t [select t.mainorgan,t.dsffdate,sum(t.amount),sum(t.totalamt),sum(t.totalcnt),sum(t.amount1)from DSFF_FEE t where t.organid=0100100014 group by t.mainorgan,t.dsffdate order by t.dsffdate desc]
at net.sf.hibernate.hql.FromParser.token(FromParser.java:102)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:293)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1530)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1501)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at org.springframework.orm.hibernate.HibernateTemplate$26.doInHibernate(HibernateTemplate.java:667)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312)
at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:655)
at cn.com.agree.web.tapestry.database.dao.hibernate.BasicDaoWithLogger.executeHQLList(BasicDaoWithLogger.java:323)
at cn.com.agree.web.tapestry.database.spring.implement.BasicManager.executeHQLList(BasicManager.java:228)
at com.icbc.sh.isbp.pub.util.db.DbQueryUtil.brSumDsffFeeInfo(DbQueryUtil.java:2210)
这条语句在oracle数据库中执行是成功的,但是利用hibernate执行的时候就会报错了~~~
这是一条sql 语句,不是hql语句
利用的是hibernate去executeSql的
org.hibernate.QueryException: Not all named parameters have bee...
很明显的错误,有一个名称参数占位符没有赋值。从后面那个08:01,我觉得你是不是直接把时间拼到HQL里面了,导致hibernate把你这个冒号后面的识别成了参数。建议你最好把HQL中的参数用setParameter方法赋值。希望对你有用。
hibernate 执行sql语句出现queryException
select t.mainorgan,t.dsffdate,sum(t.amount) as amount,sum(t.totalamt) as totalamt,sum(t.totalcnt) as totalcnt,sum(t.amount1) as amount1 from DSFF_FEE t where t.organid=0100100014 group by t.mainorgan,t.dsffdate,amount,totalamt,totalcnt,amount1 order by t.dsffdate des...
...sql查询时发生异常 org.hibernate.QueryException: Not all named...
hibernate本地sql查询时发生异常 org.hibernate.QueryException: Not all named parameters have been set 20 没有啊<sql-queryname="searchFilm"><![CDATA[select{f.*},{t.*}fromfilminfof,filetypetwhere(f.type_id=t.typeid)and(f.filmnamelike:filmname)and(f.actorlike:actor)and(f.direct... 没有...
...hibernate3.HibernateQueryException: Expected positional parameter...
where id=?and userpassword=?" ?和and之间加上空格,new String[] 改成new Object[]试试 不知道你是不是这个问题。。。