Forum Stats

  • 3,839,099 Users
  • 2,262,455 Discussions
  • 7,900,863 Comments

Discussions

function not compiling after Oracle 19c upgrade.

gkthomas
gkthomas Member Posts: 426 Bronze Badge

as part of my apex application I have the following database function to convert to json. after upgrading to Oracle 19C database , this function became invalid and not compiling . It gives only generic error , such as compilation error. Can someone help to find the reason why is it not compiling .

CREATE OR REPLACE FUNCTION VMDBDEV.get_json(name IN VARCHAR2 ) RETURN clob IS

l_xml       xmltype;

v_XML_data clob;

l_json      xmltype;

l_json_result      clob;

 

begin

v_XML_data := '<list><obj class="Plan"><att id="FirstName">

<val>ABC</val></att> </obj></list>';

IF(v_XML_data is not null) then

l_xml := xmltype.createxml(v_XML_data);

dbms_output.put_line(l_xml.getclobVal());

-- convert the JSON

l_json :=    

l_xml.transform(xmltype(roelvt.json_util_pkg.get_xml_to_json_stylesheet));

-- dbms_output.put_line(l_json);

l_json_result :=l_json.getclobVal();

-- Display the JSON 

dbms_output.put_line(l_json.getclobVal());

RETURN l_json_result;

else

RETURN null;

end if;

exception

when others then

null;

RETURN null;

END;

Tagged:

Comments