Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unexpected invalid cursor exception

666481Oct 22 2008 — edited Oct 22 2008
When I call a procedure from java, I get the following error:

java.sql.SQLException: ORA-01001: invalid cursor
ORA-06512: at "PREREVIEW_PKG", line 24
ORA-06512: at line 1

This error occurs intermittently for the same input. I haven't used any cursors in that proc. It is a very small proc that just looks up a table and gets the no. of occurrences of the input p_eco.

Line 24 is
SELECT COUNT(*) INTO v_count FROM change_table@extdb_link a
WHERE a.change_notice = p_eco AND a.organization_id = 1
AND a.status = 'Released';

When I call this proc directly in Toad/SQL Plus, I dont get any error. But, at the same time, if I try from java, most likely I'll get this exception. Can someone pls help me out?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2008
Added on Oct 22 2008
4 comments
461 views