Muliple ref cursors added to an oracle stored procedure error

We have an oracle stored procedure that originally returned 13 ref cursors. It was modifed and 3 more were added. We have another site that has 18 with total parameters passed is 22
on this one total in and out is 21. When the call is done only the original 13 ref cursors are being seen. Order of cursors is verified.
Error returned:

"ERROR","ajp-nio-127.0.0.1-8009-exec-9","05/07/2026","07:48:54","https://xyz.com","StoredProc","ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'QRY_Error'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'QRY_Error'

This is on lucee 7.0.1.100

try {

    cfstoredproc(
        datasource = dsn,
        procedure  = PKG.QRY_Error"
    ) {
        // IN params
        cfprocparam(type="in", cfsqltype="cf_sql_numeric", value=keyValueFromSession);
        cfprocparam(type="in", cfsqltype="cf_sql_numeric",value=keyValueForRecord);
        cfprocparam(type="in", cfsqltype="CF_SQL_VARCHAR",value='Y');
       
		
        cfprocresult(name="get_1", resultset=1);
        cfprocresult(name="get_2",    resultset=2);
        cfprocresult(name="pc_3",       resultset=3);
        cfprocresult(name="pc_4",  resultset=4);
        cfprocresult(name="pc_5",  resultset=5);
        cfprocresult(name="pc_6",  resultset=6);
        cfprocresult(name="pc_7",      resultset=7);
        cfprocresult(name="pc_8",       resultset=8);
        cfprocresult(name="pc_9",     resultset=9);
        cfprocresult(name="pc_10",       resultset=10);
        cfprocresult(name="pc_11",    resultset=11);
        cfprocresult(name="pc_12",    resultset=12);
        cfprocresult(name="pc_13",  resultset=13); --new
        cfprocresult(name="pc_14",  resultset=14); --new
        cfprocresult(name="pc_15",        resultset=15); --new
        cfprocresult(name="pc_16",  resultset=16);
        // OUT params
        cfprocparam(type="out", cfsqltype="CF_SQL_VARCHAR", variable="returnCode");
        cfprocparam(type="out", cfsqltype="CF_SQL_VARCHAR", variable="returnText");
    }

}

catch (any e) {

    // Log the exception
    writeLog(
        file="lucee-storedproc-error",
        type="error",
        text = serializeJSON({
            message = e.message,
            detail  = e.detail,
            sqlState= e.sqlState ?: "",
            dbError = e.nativeErrorCode ?: "",
            where   = "QRY_ERROR call"
        })
    );

    // Determine which cursors did NOT arrive
    missing = [];

    for (c in expectedCursors) {
        if (!structKeyExists(variables, c)) {
            arrayAppend(missing, c);
        }
    }

    // Log missing cursor names
    writeLog(
        file="lucee-storedproc-error",
        type="error",
        text="Missing REF CURSORs: " & serializeJSON(missing)
    );

    // Re-throw (optional but recommended)
    throw;
}

can you try using this function? it might be a caching issue

I have updated and cross referenced the stored proc docs

your problem looks like

https://luceeserver.atlassian.net/browse/LDEV-3170

We are running Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
and the extension is 19.12.0.0000
I tried the DatasourceFlushMetaCache and still get the same error:
ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to ‘QRY_Error’\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n"“,”“DETAIL”“:”“Parameter types passed (18): CF_SQL_NUMERIC, CF_SQL_NUMERIC, CF_SQL_VARCHAR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_REFCURSOR, CF_SQL_VARCHAR, CF_SQL_VARCHAR”“,”“SQLSTATE”“:”“65000"”,““DBERROR””:6550,““WHERE””:““QRY_Error call””}"

ok, thanks, i’ll keep digging

Could you try with 7.0.4.31-SNAPSHOT, you’re on quite an older version…

tried
7.0.2.106
7.0.3.43 and 7.0.4.31-RC

Replacing the jar file, not full installs.

Caused by: Error : 6550, Position : 6, Sql = BEGIN Pkg.QRY_Error(:1 ,:2 ,:3 ,:4 ,:5 ,:6 ,:7 ,:8 ,:9 ,:10 ,:11 ,:12 ,:13 ,:14 ,:15 ,:16 ,:17 ,:18 ) ; END;, OriginalSql = { call Pkg.QRY_Error(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }, Error Msg = ORA-06550: line 1, column 7:

PLS-00306: wrong number or types of arguments in call to ‘QRY_ERROR’

ORA-06550: line 1, column 7: