我在做一个hibernate 批量更新的问题的时候,遇到下面问题,请高手帮助一下:
action 代码:
......
//调用service方法
size = pourService.updateBatchDPourRecords(scrapCode,prId_);
......
service 代码:
......
public int updateBatchDPourRecords(String value,int pitId){
    int size = pourDao.updateBatchDPourRecords(value, pitId);
    return size;
}
......
Dao代码public Integer updateBatchDPourRecords(String value, int pitId) {
session = this.getSession();
Transaction tx = session.beginTransaction();
int updateds = -1;
System.out.println("value="+value+" prId="+pitId);
String hql = "UPDATE DPourRecord set scrapCode = :value where pitId=:pitId";
try {
updateds = session.createQuery(hql)
.setString("value",value)
.setInteger("pitId", pitId)
.executeUpdate();
tx.commit();
session.close();
} catch (RuntimeException re) {
re.printStackTrace();
}
System.out.println("更新数据的条数:"+updateds);
return updateds; 

}通过bug跟踪及控制台显示,程序代码能够成功更新数据,关键就是在返回的时候,从servie 向Action 返回int 的时候,程序就不继续跟踪了,显示:
Source not found for DPourRecordService$$FastClassByCGLIB$$cacb1ff7.invoke(int, Object, Object[]) line: not availableaction 打印返回的参试也没有,不知道这是为什么?弄一天了,也没整明白,请各位帮助!多谢了  msn:  [email protected]