ref cursor Oracle close (with tParseRecordSet)

One Star

ref cursor Oracle close (with tParseRecordSet)

Hello,
I have a problem during the recovery of the data of a ref cursor.
A bug on the level of the closing of the cursor it seems to me.
In the 2 screeshots below, one is carried out without error and the other return an error:
Exception in component tOracleSP_1
java.sql.SQLException: Cursor is closed.
In the case in error, connection is open in the beginning of the job.
In the other, connection is opened to each iteration and to close in end.
My opinion is the component tParseRecordSet does not close correctly the ref cursor Oracle at the end of the fetch and maximum number of cursor is reached (or an equivalent error)
Would somebody have an idea on this subject?
Would be possible to force the closing of the ref cursor in a component tJava or other?
Thank you in advance for your assistance.
Orlando
Six Stars

Re: ref cursor Oracle close (with tParseRecordSet)

Hello Orlando,
I experienced also issue related to error message "Cursor is closed" with tOracleSP component in my scenarios. It was because the cursor was returned empty from database (contained no data) and so then was seen by the component as closed. I also use instead of procedures rather functions, so in case of this erro I was not able to catch the function return value.
We did some changes on the database API side (PL-SQL), so the cursor is returned opened even if contains no data. And also the return code 2 (which in our specifiaction means "NO_DATA_FOUND" and I could work with this return value later in scenario.
Maybe you experience another kind of problem, but it seems to be similar to the one I already experienced.
Best regards,
archenroot
One Star

Re: ref cursor Oracle close (with tParseRecordSet)

Hi archenroot,
I do not have the hand on the stored procedure to be able to modify it.
But I will propose a request for modification.
While waiting, i will try to treat the error differently, via Talend directly.
It?s damage to not be able to treat the error with the level of Talend as it could being in another treatment, for example in pl/sql (%ISOPEN).
Thank you very much for your assistance.
Best regards,
Orlando
Six Stars

Re: ref cursor Oracle close (with tParseRecordSet)

Hi,
the only workaround is continue using component trigger "On Component Error" and then send error message to some output (log, email, etc.).
I already solved it in my case, so if you have any specific questions you are welcomed.
Best regards,
archenroot