3 Replies Latest reply on Feb 26, 2010 1:17 PM by bluefrog

    ORA-04030 and dbms_xslprocessor.valueOf

    Zabo
      Hello,

      I wrote the following procedure Bug_Test as a simple example of what I have in my programs.

      CREATE OR REPLACE procedure Bug_Test
      is
      v_clob clob := empty_clob();
      v_xmldoc Dbms_Xmldom.Domdocument;
      v_root Dbms_Xmldom.Domnode;
      v_node_list Dbms_Xmldom.Domnodelist;
      v_node_text Dbms_Xmldom.Domnode;
      v_value number;
      begin
      v_clob := '<?xml version="1.0"?><root><a><b>0</b><c>0</c><d>4</d><e>0</e><f>0</f><g>173</g></a><a><b>0</b><c>0</c><d>5</d><e>0</e><f>0</f><g>6</g></a></root>';
      v_xmldoc := Dbms_Xmldom.Newdomdocument(v_clob);
      v_root := Dbms_Xmldom.Makenode(v_xmldoc);
      v_node_list := Dbms_Xslprocessor.Selectnodes(v_root,'/root/a');


      for i in 0..Dbms_Xmldom.Getlength(v_node_list)-1 loop
      v_node_text := Dbms_Xmldom.item(v_node_list,i);
      dbms_xslprocessor.valueOf(v_node_text,'b/text()',v_value);
      end loop;

      Dbms_Xmldom.Freedocument(v_xmldoc);

      end Bug_Test;

      If I execute once the procedure there is no problem.

      But if I execute the following script :

      declare
      begin
      for i in 1..100000 loop
      Bug_Test;
      end loop;
      end;
      /

      I get the following error

      ERREUR Ó la ligne 1 :
      ORA-04030: mÚmoire de traitement manquante lors d'affectation de 20508 octets
      (qmxdContextEnc,)
      ORA-06512: Ó "XDB.DBMS_XSLPROCESSOR", ligne 1010
      ORA-06512: Ó "XDB.DBMS_XSLPROCESSOR", ligne 1036


      And my database version is :
      Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
      PL/SQL Release 11.1.0.7.0 - Production
      CORE     11.1.0.7.0     Production
      TNS for Linux: Version 11.1.0.7.0 - Production
      NLSRTL Version 11.1.0.7.0 - Production

      what's wrong with my code ?

      Edited by: Zabo on Feb 26, 2010 4:59 AM

      Edited by: Zabo on Feb 26, 2010 5:11 AM