Solved

Bug in 10g JDBC?? (ORA-01403)

Posted on 2004-10-05
5
633 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:androknego
  • 2
5 Comments
 
LVL 22

Expert Comment

by:earth man2
ID: 12235788
Have you tried debugging this using JDeveloper ?
0
 
LVL 2

Author Comment

by:androknego
ID: 12243368
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).
0
 
LVL 22

Accepted Solution

by:
earth man2 earned 300 total points
ID: 12244273
Instrument your java with JDWP and remotely debug with JDeveloper.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question