You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Daryl Beattie <Da...@screamingmedia.com> on 2001/02/26 18:39:41 UTC

Threading problem

Dear Xerces developers,

	I am using Xerces 1.2.1 in conjunction with Xalan 1.2.1. I am
getting some kind of a bug which causes my threads to completely lock up.
The problem is very hard for me to trace, and it sometimes takes up to 36
hours for my system to halt from it, meaning it's also very hard to
reproduce. I do have the following stack trace, however, which my system
threw right before all my xalan-using threads locked up.
	I should tell you, my threads each start up their own Xalan which is
used to transform a document. No sharing of information happens between
these threads. When I reduce the number of threads to 1 (effectively
removing any multi-thread issues) the system works fine.
	If any changes are made (or have been made) that you think may
remedy the problem, I can run 6 instances of my program under very heavy
loads on two different machines. If they all work for more than 12 hours,
then I can be pretty sure the problem has gone away.
	This problem has been described as a "needle in a haystack", and
indeed it is. Members of the Xalan group, while not blaming Xerces, would
like me to make you aware of the problem in case you have any insight into
how to solve it.
	Should any of you require testing style-sheets/documents, I can
forward them along. However, it's worth noting that the problem is not with
the documents or style sheets, it happens no matter what style sheets or
input documents I use. It is an issue that only occurs when I use multiple
threads with Xalan/Xerces. Here is the stack trace I mentioned earlier:

org.apache.xalan.xslt.XSLProcessorException: ; at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1731); at
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java:7
91); at
com.screamingmedia.contentwriter.SectionThread.primTransform(SectionThread.j
ava:489); at
com.screamingmedia.contentwriter.SectionThread.doProcess(SectionThread.java:
248); at
com.screamingmedia.contentwriter.SectionThread.run(SectionThread.java:854);
---------; org.xml.sax.SAXException: XercesLiaison.parse error; at
org.apache.xalan.xpath.xdom.XercesLiaison.parse(XercesLiaison.java:311); at
org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:289); at
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java:7
84); at
com.screamingmedia.contentwriter.SectionThread.primTransform(SectionThread.j
ava:489); at
com.screamingmedia.contentwriter.SectionThread.doProcess(SectionThread.java:
248); at
com.screamingmedia.contentwriter.SectionThread.run(SectionThread.java:854);
---------; org.xml.sax.SAXException: ;at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917); at
org.apache.xalan.xpath.xdom.XercesLiaison.parse(XercesLiaison.java:293); at
org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:289); at
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java:7
84); at
com.screamingmedia.contentwriter.SectionThread.primTransform(SectionThread.j
ava:489); at
com.screamingmedia.contentwriter.SectionThread.doProcess(SectionThread.java:
248); at
com.screamingmedia.contentwriter.SectionThread.run(SectionThread.java:854);
---------; java.lang.NullPointerException: ; at
org.apache.xerces.validators.common.XMLValidator.init(XMLValidator.java:1535
); at
org.apache.xerces.validators.common.XMLValidator.<init>(XMLValidator.java:40
1); at org.apache.xerces.framework.XMLParser.<init>(XMLParser.java:203); at
org.apache.xerces.parsers.SAXParser.<init>(SAXParser.java:164); at
java.lang.Class.newInstance0(Native Method); at
java.lang.Class.newInstance(Class.java:237); at
org.apache.xalan.xpath.xml.ObjectPool.getInstance(ObjectPool.java:47); at
org.apache.xalan.xpath.xdom.XercesLiaison.parse(XercesLiaison.java:252); at
org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:289); at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.parse(XMLParserLiaisonDef
ault.java:523); at
org.apache.xalan.xslt.XSLTEngineImpl.parseXML(XSLTEngineImpl.java:986); at
org.apache.xalan.xslt.StylesheetHandler.processImport(StylesheetHandler.java
:1292); at
org.apache.xalan.xslt.StylesheetHandler.startElement(StylesheetHandler.java:
516); at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1335); at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java:821); at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne
r.java:1852); at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1233); at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:380); at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900); at
org.apache.xalan.xpath.xdom.XercesLiaison.parse(XercesLiaison.java:293); at
org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:289); at
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java:7
84); at
com.screamingmedia.contentwriter.SectionThread.primTransform(SectionThread.j
ava:489); at
com.screamingmedia.contentwriter.SectionThread.doProcess(SectionThread.java:
248); at
com.screamingmedia.contentwriter.SectionThread.run(SectionThread.java:854)


	Thanks so much for your attention. I would gladly help in any way to
solve this problem. I seem to be the only one able to reproduce it (because
I have several instances of the multi-threaded system set up), which creates
difficulty when debugging. That said, I would love to have this problem
fixed and will help with developmental testing.

Sincerely,

	Daryl.


Daryl Beattie
Java Developer/Research and Development
ScreamingMedia
601 West 26 Street 13 Floor
New York New York 10001
T 212 691 7900 F 212 691 1483
Direct 212 659 1895
www.screamingmedia.com <http://www.screamingmedia.com> 

ScreamingMedia <http://www.screamingmedia.com/>

ScreamingMedia makes headlines <http://www.screamingmedia.com/en/press/>