Is there something preventing you from moving to a more recent release 
(like 2.9)? Xerces-J 2.2 is over four years old now. We've fixed hundreds 
of bugs since then. Several of the fixes were for memory leaks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

"Avihai Marchiano" <[EMAIL PROTECTED]> wrote on 01/08/2007 02:54:42 
PM:

> Hey,
> 
> I am using xerces ver #2.2 and I am using a lot in DomParser.
> 
> After some time (around 36 hours) I get OutOfMemory.
> 
> I test my application with JProbe memory debugger and I notice that 
> a lot of resources (especially String) were not released after 
> parsing was finished and garbage collector was run.
> 
> The only related topic that I found is:
> http://mail-archives.apache.org/mod_mbox/xerces-j-users/200212.
> mbox/[EMAIL PROTECTED]
> But there is no answer.
> 
> Please, give your advices.
> 
> Thank you.
> 
> 
> My code is:
>              DOMParser parser = new DOMParser();
>             XMLParserErrorHandler xmlParserErrorHandler = new 
> XMLParserErrorHandler();
>             parser.setErrorHandler(xmlParserErrorHandler);
> 
>             parser.setFeature("http://xml.org/sax/features/validation";, 
true);
> 
>             parser.setFeature("http://apache.
> org/xml/features/validation/schema", true);
> 
>             StringBuffer sb = new StringBuffer(SCHEMA_NS_URI);
>             sb.append(" ");
>             sb.append(new File(SCHEMA_XSD_LOCATION).toURI().toString());
> 
>             parser.setProperty("http://apache.
> org/xml/properties/schema/external-schemaLocation",
>                               sb.toString());
> 
>             parser.setFeature("http://xml.org/sax/features/namespaces
",true);
> 
> 
>             m_document  = null;
>             parser.parse(new InputSource(new 
FileInputStream(schemaFile)));
>             m_document = parser.getDocument();

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to