Solved

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

Posted on 2004-10-05
5
621 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now