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/%3c2
[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-sch
emaLocation",

                              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();

Reply via email to