Link to home
Start Free TrialLog in
Avatar of androknego
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
Avatar of earth man2
earth man2
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you tried debugging this using JDeveloper ?
Avatar of androknego
androknego

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).
ASKER CERTIFIED SOLUTION
Avatar of earth man2
earth man2
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial