#1117 Oracle11g: java.lang.IllegalArgumentException: No SQL selected for execution

2.1final
open
nobody
oracle (1)
3
2013-12-10
2013-12-10
amwfc
No

Below code uses Oracle 11g Express demo database. The procedure was compiled in SQL Developer.

CREATE OR REPLACE procedure sp_ListOrders(orderCursor OUT SYS_REFCURSOR)
IS
BEGIN
open orderCursor FOR
SELECT * FROM ALEX.demo_orders;
END;

When this code runs in SQL Developer, it completes successfully.

DECLARE
crsOrder SYS_REFCURSOR;
tblOrder ALEX.demo_orders%rowtype;
BEGIN
alex.sp_listorders(crsOrder);
loop
FETCH crsOrder into tblOrder;
exit when crsORder%notfound;
end loop;
close crsOrder;
dbms_output.put_line(tblOrder.order_id);
END;

It throws the following error in Squirrel 3.5.0 using ojdbc7.jar:

java.lang.IllegalArgumentException: No SQL selected for execution.
Position: 0

Discussion