Hi,
I'm trying to execute a store procedure in Oracle. Every time I tried, my application hung while my CPU utiliztion remained high. I traced the problem to an endless loop which is occuring in the JdbcTemplate class.
I then went and copied this code exactly:
http://www.springframework.org/docs/...toredProcedure
This code also results in an endless loop in the extractReturnedResultSets method. The code in the JdbcTemplate class:
When I run it, moreResults becomes false, while updateCount is 1, and the do while loop never terminates.Code:protected Map extractReturnedResultSets(CallableStatement cs, List parameters, int updateCount) throws SQLException { Map returnedResults = new HashMap(); int rsIndex = 0; boolean moreResults; do { if (updateCount == -1) { Object param = null; if (parameters != null && parameters.size() > rsIndex) { param = parameters.get(rsIndex); } if (param instanceof SqlReturnResultSet) { SqlReturnResultSet rsParam = (SqlReturnResultSet) param; returnedResults.putAll(processResultSet(cs.getResultSet(), rsParam)); } else { logger.warn("ResultSet returned from stored procedure but a corresponding " + "SqlReturnResultSet parameter was not declared"); } rsIndex++; } moreResults = cs.getMoreResults(); updateCount = cs.getUpdateCount(); if (logger.isDebugEnabled()) { logger.debug("CallableStatement.getUpdateCount returned [" + updateCount + "]"); } } while (moreResults || updateCount != -1); return returnedResults; }
Can somebody verify that this problem isn't exclusive to my environment?
Thanks,
-Dave


Reply With Quote