ORA-4030 Occurance Using DBMS_XSLPROCESSOR.ValueOf() in a loop (Doc ID 727945.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7 - Release: 11.1 to 11.1
Information in this document applies to any platform.

Symptoms

When utilizing XML calls in a loop similar to the following:

 

create or replace procedure test_proc(in_xml in clob) as
   junk varchar2(255);
   doc dbms_xmldom.DOMDocument;
   node dbms_xmldom.DOMNode;
begin
   doc := dbms_xmldom.newDomDocument(in_xml);
   node := dbms_xmldom.makeNode(doc);
   dbms_xslprocessor.valueOf(node,'//root/targetNode',junk);
   ...
   dbms_xmldom.freeNode(node);
   dbms_xmldom.freeDocument(doc);
   ...
end;
/

declare
   tmp_xml clob :=
'<root>
<node1>The quick brown fox jumped over the lazy dog.</node1>
</root>';
begin
   for i in 1..10000 loop
     test_proc(tmp_xml);
   end loop;
end;
/


 

You may receive following error:

 

ERROR at line 1:
ORA-20999: ORA-04030: out of process memory when trying to allocate 21076 bytes (qmxdContextEnc,)
ORA-06512: at "SYS.TEST_PROC", line 37
ORA-06512: at line 31

 

Then you may have encountered bug 7009011.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms