qq_35113297 2017-07-23 10:37 采纳率: 0%
浏览 584

hibernate在执行setParams() 报Source not found

编辑了个hibernatehelper 做了个登录界面 debug了下 执行到query.setParameter后报这个错误(发现map 和hql语句都传进去了) 代码在下面
Source not found for hibernateHelper$$FastClassByCGLIB$$decadcff.invoke(int, Object, Object[]) line: not available

```String hql="from Student where username=:username and userpassword=:password";
public Object queryUniq(String hql,Map map){
Query query=getSession().createQuery(hql);
if(null!=map){
Set set=map.keySet();
Iterator it=set.iterator();
while(it.hasNext()){
String key=(String)it.next();
if(key.contains("List")){
query.setParameterList(key, (Collection) map.get(key));
}else{
query.setParameter(key, map.get(key));
}
}
}
return query.uniqueResult();
}


  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2018-07-17 15:05
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器