Hi - I am facing a typipcal isssue when calling a stored proc from a java application.The stored proc returns a single cursor (resultSet) back.

Though the piece of code that creates the db connection and the CallableStatement is totally independent and proper care is taken that
resultSet object,CallableStatement object,connection object are all closed, still on certain calls to the stored procedure I get the below exception.

com.ibm.db2.jcc.b.SQLException: A result has opened by the previous getResultSet() or getUpdateCount() call, Need to call getMoreResults()

I suspected may be somewhere before the call to this method some other resultSet is open or a CallableStatement is open (the application I am working on uses lot of stored procedure calls returning 1-5 cursors back to the java side), but its difficult to trace out all such areas.Also even if there are open resultsets left prior to calling this stored proc it should not matter since this proc uses totally new connection objects,CallableStatement object and result object.

I am using driver Type 4 - db2jcc.jar on UDB8.0

If anyone has faced similar problems please share your thoughts with me.I am in urgent need of resolving this issue.

Thanks for all the help in advance !
mmarwaha