【发布时间】:2013-08-12 15:22:29
【问题描述】:
我无法弄清楚为什么我的结果集抛出异常.. 结果集对象在调试时不为空,但无法进入if语句 if(resultset.next()) 我不确定我在做什么错.. 谢谢你的帮助。
顺便说一句,我正在通过黄瓜测试访问这个类,但是在这个阶段我认为这与问题无关..
下面是相关代码:
input = new Object[]{nEventID, nEventID, nAccountID};
callback = new NamedQueryStatementCallback("GET_ACTIVE_EVENT_ENTITLEMENT_DETAILS", input, false);
resultSet = (ResultSet)getHibernateTemplate().execute(callback);
if (resultSet != null)
{
outputList = new ArrayList();
if (resultSet.next()) //here is where exception gets thrown - on first iteration, so it never enters branch
{
do
{
//create object list with data
}while (resultSet.next());
}
}
【问题讨论】:
标签: java exception resultset cucumber-jvm