Title:
null/blank clob value returned as reference cursor from select statement in oracle causes No More Data Available To Read
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Eric Harris / Eric Harris (Eric Harris)
Created: 06/16/2016
Components: Database
Versions: 11.0
Failure Type: Non Functioning
Found In Build/Fixed In Build: CF11_Final / 303100
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Win 2012 Server x64
Vote Count: 0
Problem Description: Coldfusion 11, Patch 9 looks to have introduced a bug where if you select a clob column that has blank text in it ( dbms_lob.getlength() returns null/nothing ) and this select statement is returned as a referenced cursor coldfusion is returning "[Macromedia][Oracle JDBC Driver]No more data available to read."
Steps to Reproduce:
create a table that has a clob in it. Insert a record and for the clob text use '' ( 2 single quotes right next to each other ).
create a database procedure that returns a referenced cursor
use dbms_sql.parse() to select the clob column.
use dbms_sql.execute() and then dbms_sql.to_refcursor() to create the referenced cursor. Return value as out parameter to CF
Coldfusion will throw JDBC Driver error.
Actual Result:
Coldfusion 11 Patch 9 returns JDBC Driver error
Expected Result:
Coldfusion 11 Patch 8 does not return error condition and processes properly.
Any Workarounds:
Yes. Instead of selecting the column, use a case statement to determine if their is a value in the clob. If not, return empty_clob():
replace( case when dbms_lob.getlength( table_text) >= 0 then table_text else empty_clob() end,chr(10), '<br>') table_text,
instead of:
replace( table_text, chr(10), '<br>') table_text,
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4165262
Reason: PRHaveInfo
External Customer Info:
External Company:
External Customer Name: Eric Harris
External Customer Email:
External Test Config: My Hardware and Environment details:
Windows 2012 R2 64 bit
Coldfusion 11 Patch 9 64 bit
Attachments:
Comments: