cfstoredproc fails when calling a procedure with parameters on Oracle with a specified schema

Description

If cfstoredproc is used to call a procedure with parameters within an Oracle package, it fails if you try to specify a schema name. The error returned is:

ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'TESTPROC' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
calling lucee_bug_test.testfunc

This only happens when a schema is specified and only occurs if parameters are passed to the procedure. It may be a problem with the way lucee handles the extra dot when parsing the package/procedure name.

An example of code that triggers this bug (note the schema name that prefixes the package):

<cfstoredproc procedure="myschema.mypackage.myproc" datasource="#ds#" username="#dsUser#" password="#dsPass#">
<cfprocparam cfsqltype="cf_sql_varchar" value="foo">
</cfstoredproc>

The following code would not trigger this bug as no schema is specified:

<cfstoredproc procedure="mypackage.myproc" datasource="#ds#" username="#dsUser#" password="#dsPass#">
<cfprocparam cfsqltype="cf_sql_varchar" value="foo">
</cfstoredproc>

The attached files demonstrate this bug.

Environment

Lucee version: 4.5.2.018

DatabaseName: Oracle
DatabaseVersion: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
DriverName: Oracle JDBC driver
DriverVersion: 12.1.0.2.0

Attachments

3

Activity

Show:

Former user 2 May 2016 at 07:54

Thank you!!! I have testet it with version "Lucee 4.5.3.015 final".

1.Following statement with prepending "schema" works.
<cfstoredproc procedure="#schema#.package.function" datasource="myDBSource"></cfstoredproc>

2.Following statement with prepending "schema" AND parameters works too.
{{<cfstoredproc procedure="#schema#.package.function" datasource="myDBSource>
<cfprocparam type="in" cfsqltype="cf_sql_numeric" value="#val(A)#">
<cfprocparam type="in" cfsqltype="cf_sql_numeric" value="#val(B)#">
<cfprocparam type="in" cfsqltype="cf_sql_numeric" value="#val(C)#">
</cfstoredproc>
}}

Michael Offner 29 April 2016 at 16:23

solved for 4.5

Michael Offner 29 April 2016 at 15:26

Lucee 5 will be released very soon as a stable release and then free maintance for Lucee 4.5 will stop then, except for security issues and issues that are important for a lot of users. I will see if i can find some time to migrate this fix to 4.5, but because we only have an oracle testserver in place for Lucee 5, i would need your help to test the result.

Former user 26 April 2016 at 15:33

It doesn't help to fix it in a RC 2 an not for the stable version 4.5.
This bug is a KO crit for the migration from railo to lucee.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 20 November 2015 at 15:08
Updated 14 May 2021 at 10:45
Resolved 11 April 2016 at 10:12