建议
List lt = new ArrayList();
Query q1=session.createQuery();
lt=q1.list();

解决方案 »

  1.   

    不知道LZ想要什么样的结果,你的SQL语句违反了group by的语法规则
    要么这样改
    select   i.Corpbm,i.Corpurl   from   FBDGset   as   i   where   i.Dgtitle   like   '%"+keyword[0]+"%'   group   by   i.Corpbm, i.Corpurl --多追加一个group by字段
    要么这样修改
    select i.Corpbm, MAX(i.Corpurl)   from   FBDGset   as   i   where   i.Dgtitle   like   '%"+keyword[0]+"%'   group   by   i.Corpbm, --对i.Corpurl字段用聚集函数,如MAX,MIN,SUM等等