androknego
asked on
Bug in 10g JDBC?? (ORA-01403)
Hi
We're just testing now 10.1.0.3 database on Windows as well as Apache Tomcat using the latest 10g client and JDBC drivers. However there is an exception which doesn't happen on the same database server, Apache Tomcat, but with a 9i client and JDBC:
In a stored procedure a second ref cursor is opened
OPEN ref_cursor2 FOR
SELECT ...
The Java code successfully calls the stored procedure but when it tries to loop through the cursor ORA-01403 is returned. It just uses while rst.next() loop as usual and there are some records returned. To sum up, the Java code is doing the fetching, not the PL/SQL and it doesn't happent on a 9i client.
Thanks in advance
We're just testing now 10.1.0.3 database on Windows as well as Apache Tomcat using the latest 10g client and JDBC drivers. However there is an exception which doesn't happen on the same database server, Apache Tomcat, but with a 9i client and JDBC:
In a stored procedure a second ref cursor is opened
OPEN ref_cursor2 FOR
SELECT ...
The Java code successfully calls the stored procedure but when it tries to loop through the cursor ORA-01403 is returned. It just uses while rst.next() loop as usual and there are some records returned. To sum up, the Java code is doing the fetching, not the PL/SQL and it doesn't happent on a 9i client.
Thanks in advance
Have you tried debugging this using JDeveloper ?
ASKER
No, we don't use JDeveloper, just straight servlets (old school). How could you debug it there? I think maybe I can tyr to use some JDBC tracing to see what's exactly happening.
BTW, the issue seems to be that the stored procedure is returning more than one ref cursor (actually three of them). Right now we got ref cursors A, B and C and the second one that we try to open always fails, no matter if it's A, B or C. I've read in the Oracle JDBC docs that Oracle did seem to change some things on 10g in the way cursors work but not sure what's exactly happening here. Also tried setting auto-commit to false, no luck there either (and there are no DMLs in the procedure anyway, only SELECTs).
BTW, the issue seems to be that the stored procedure is returning more than one ref cursor (actually three of them). Right now we got ref cursors A, B and C and the second one that we try to open always fails, no matter if it's A, B or C. I've read in the Oracle JDBC docs that Oracle did seem to change some things on 10g in the way cursors work but not sure what's exactly happening here. Also tried setting auto-commit to false, no luck there either (and there are no DMLs in the procedure anyway, only SELECTs).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.