Menu

#849 Invalid SEVERE error message for DB2 stored proc with cursor

5.4
open
nobody
Engine (123)
5
2010-03-16
2010-03-16
prichards
No

5.2 and 5.4 GA

If a cursor is returned from a stored procedure, using a JDBC driver that does not support the resultset.isAfterlast() method, a SEVERE error is logged for each row in the result set. The Exception is captured and logged for each row, but is not re-thrown and does not trigger Error Handling. The result of the check (for cursorsHaveData() is asumed to be true and the end of the data is detected in another manner, i.e. when the resultset.next() method returns false). The error message (from a DB2 example) looks something like the following:

2010-03-16 09:30:25.470 000001.0010 SEVERE SqlBizCompInst::cursorsHaveData Error in executing BizComponent [mysp.xbc]:Caught SQLException:
com.ibm.db2.jcc.c.SqlException: This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE or
TYPE_SCROLL_INSENSITIVE)

Recommendation: either a different method should be used to check if the cursor has more data (as is already done in case the exception is thrown); or the error message should be changed to an informational message (FINE or FINEST) since it does not represent a SEVERE condition.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB