Details
Assignee
UnassignedUnassignedReporter
Reggie SuplidoReggie SuplidoPriority
NewLabels
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
Affects versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Reggie Suplido
Reggie SuplidoPriority
Labels
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
Affects versions
Created 29 October 2019 at 13:05
Updated 14 May 2021 at 11:41
We are almost done converting our systems from ACF to Lucee. We have identified several bugs (mostly on Oracle) and @Igal Sapir (Thanks Igal!) has fixed most of them on 5.3.4.54-RC.
Anyway, I ran into the following that previously worked on ACF but not on Lucee. This involves returning data from an Oracle stored procedure of data type: XMLTYPE.
Here's the test Stored Procedure:
CREATE OR REPLACE PROCEDURE SP_XMLTEST_BUG( cur_XMLOut OUT sys_refcursor ) AS BEGIN OPEN cur_XMLOut FOR SELECT XMLELEMENT("SystemDate",to_char(sysdate,'YYYYMMDD')) FROM DUAL; END;
Here's the test script:
<cftry> <cfstoredproc procedure="SP_XMLTEST_BUG" datasource="Oracle"> <cfprocresult name="qTest"> </cfstoredproc> <cfcatch> <cfoutput> <p>#cfcatch.message#</p> <p>Caught an exception, type = #cfcatch.TYPE#</p> </cfoutput> </cfcatch> <cfdump var="#qTest#" /> </cftry>
It runs with no error but comes back with:
I've identified the workaround which is to force the output to be of type CLOB using XMLSerialize:
CREATE OR REPLACE PROCEDURE SP_XMLTEST_BUG( cur_XMLOut OUT sys_refcursor ) AS BEGIN OPEN cur_XMLOut FOR SELECT XMLSerialize(DOCUMENT XMLELEMENT("SystemDate",to_char(sysdate,'YYYYMMDD'))) FROM DUAL; END;
The output is then correct:
This is my first time reporting a bug here so forgive me if I am not accustomed to the reporting standards.
Thanks.