?
Solved

ORA-29554 unhandled java out of memory condition

Posted on 2003-02-24
4
Medium Priority
?
2,407 Views
Last Modified: 2007-12-19
I have had issues with this error message before.  You can find my first go-round with this thing here:

http://www.experts-exchange.com/Databases/Oracle/Q_20457732.html

i am getting the ORA-29554 error while trying to parse xml files when i attempt to run too many records through my process at one time. i have upped my JAVA_MAX_SESSIONSPACE_SIZE to 200mb in my INIT.ORA file. it's hard to believe that i'm using all of this up? does anyone know if it's common to have this param set higher than this? also, can someone look over my procedure below and tell me if you see a component that i'm not freeing or something? i'm trying figure out what is hogging up all my memory. while this procedure is called many times within the same process (using a loop for each xml file i have), after i'm done with it each time i can totally free all the memory. i don't need anything else from it. am i doing that correctly with the statements at the end of the proc? any comments/suggestions will be greatly appreciated. feel free to ask any questions that can help clear things up.

thanks,

ben

CREATE OR REPLACE PROCEDURE boxml_proc (
   p_xml_dir   VARCHAR2,
   p_xsl_dir   VARCHAR2,
   p_xmlfile   VARCHAR2,
   p_xslfile   VARCHAR2,
   p_resfile   VARCHAR2
)
IS
   v_p             sys.xmlparser.parser;
   v_xmldoc        sys.xmldom.domdocument;
   v_xmldocnode    sys.xmldom.domnode;
   v_proc          sys.xslprocessor.processor;
   v_ss            sys.xslprocessor.stylesheet;
   v_xsldoc        sys.xmldom.domdocument;
   v_docfrag       sys.xmldom.domdocumentfragment;
   v_docfragnode   sys.xmldom.domnode;
   v_xslelem       sys.xmldom.domelement;
   c_nspace        VARCHAR2 (50);
   v_xslcmds       sys.xmldom.domnodelist;
BEGIN

--new parser
   v_p := sys.xmlparser.newparser;

--set characteristics
   sys.xmlparser.setvalidationmode (v_p, FALSE);
   sys.xmlparser.setpreservewhitespace (v_p, TRUE);
   sys.xmlparser.setbasedir (v_p, p_xml_dir);

-- parse xml file
   sys.xmlparser.parse (v_p,    p_xml_dir
                             || '/'
                             || p_xmlfile);

--get document
   v_xmldoc := sys.xmlparser.getdocument (v_p);

--parse xsl file
   sys.xmlparser.parse (v_p,    p_xsl_dir
                             || '/'
                             || p_xslfile);

--get document
   v_xsldoc := sys.xmlparser.getdocument (v_p);
   v_xslelem := sys.xmldom.getdocumentelement (v_xsldoc);
   c_nspace := sys.xmldom.getnamespace (v_xslelem);
   v_xslcmds := sys.xmldom.getchildrenbytagname (v_xslelem, '*', c_nspace);

--make stylesheet
   v_ss := sys.xslprocessor.newstylesheet (
              v_xsldoc,
                 p_xsl_dir
              || '/'
              || p_xslfile
           );

--process xsl
   v_proc := sys.xslprocessor.newprocessor;
   sys.xslprocessor.showwarnings (v_proc, TRUE);
   v_docfrag := sys.xslprocessor.processxsl (v_proc, v_ss, v_xmldoc);
   v_docfragnode := sys.xmldom.makenode (v_docfrag);
      sys.xmldom.writetofile (v_docfragnode,    p_xml_dir
                                          || '/'
                                          || p_resfile);
 sys.xmlparser.freeparser(v_p);
 sys.xmldom.freedocument(v_xmldoc);
 sys.xmldom.freedocument(v_xsldoc);
 sys.xslprocessor.freeprocessor(v_proc);
 sys.xslprocessor.freestylesheet(v_ss);

 END;
/
0
Comment
Question by:benpung
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Expert Comment

by:Daniel Stanley
ID: 8011947
i'd query the sga usage(v$sgastat) and verify which component gets utilized fully when running the xml code; then increase the parameter accordingly.


good luck,
daniels@asix.com
0
 
LVL 1

Author Comment

by:benpung
ID: 8051690
i have not forgotten about this issue. i've just been sidetracked with some other stuff. i'll try the suggestion when i get time and let you know. thanks for the help.
0
 
LVL 1

Author Comment

by:benpung
ID: 8071127
how do i tell which component gets utilized?
0
 
LVL 1

Accepted Solution

by:
indypung earned 150 total points
ID: 8167966
i am closing this due to extended inactivity.  i realized that i'm using the DOM API to do the xml parsing and this is very memory intensive so i need to look in to using SAX.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question