I was having trouble in json_dyn.executelist when my result set included null CLOBs. I traced the problem to the json_value type, specifically the following overload:
CONSTRUCTOR FUNCTION json_value(str CLOB, esc BOOLEAN DEFAULT TRUE)
The problem is that an attempt is made to read a null CLOB starting at position 1:
To fix this, I wrapped the attempt in an IF:
IF dbms_lob.getlength(str) > 0 THEN
Since self.str is already null, this handles it fine for me. Is this the best fix? If so, I'd like to offer it for the next release of this excellent product. Thanks for all of your hard work!
I'm having the same problem with null clobs, but I can't seem to locate this code to apply your fix. Where would I find JSON_VALUE?
Never mind. I found it, and notsoswift's patch worked like a charm.
json_value_body.typ (Line 34):
34 if(dbms_lob.getlength(str) > 0) then
35 dbms_lob.read(str, amount, 1, self.str);
36 end if;