后台:
public AskleaveList query(String stuid,int contact){
return (AskleaveList) hibernateTemplate.find("from Askleave a where a.stuid= '"+stuid+"' and a.contact = '"+contact+"'").get(0);
}
运行时时报错:
java.lang.ClassCastException: com.model.Askleave cannot be cast to com.qihang.bgzdh.model.AskleaveList
com.dao.impl.AskleaveDaoImpl.query( AskleaveDaoImpl.java:65)
显示上面的find方法执行出错
public AskleaveList query(String stuid,int contact){
return (AskleaveList) hibernateTemplate.find("from Askleave a where a.stuid= '"+stuid+"' and a.contact = '"+contact+"'").get(0);
}
运行时时报错:
java.lang.ClassCastException: com.model.Askleave cannot be cast to com.qihang.bgzdh.model.AskleaveList
com.dao.impl.AskleaveDaoImpl.query( AskleaveDaoImpl.java:65)
显示上面的find方法执行出错