Raphael Tagliani wrote:
Hi everyone!
I'm on a big java project, which parses a lot of xml files at the launch
of a server.
The problem is, we have a concurrency problem at the launch.
In fact, it's a FWK005 Xerces error, and we can't find out from where it
comes from. We already tried to make every method calling Xerces
'synchronized', but no change!
Here is my question: would you know how to find this error? How to know
which method calls xerces in a concurrent way (maybe a debugger which
would listen the calls to xerces)?
The error:
Caused by: org.xml.sax.SAXException: FWK005 parse may not be called
while parsing.
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
http://acroyear.blog-city.com/xerces_and_the_dreaded_fwk005.htm
Hi Raphael,
this sounds more like a simple recursion problem than a concurrency problem
related to multi-threading. In this case, the use of synchronized blocks/methods
would not help anything. Are you sure that you do not reuse the parser instance
while processing a SAX event? A full stack trace of your exception should
normally reveal this (which you unfortunately did not supply). If not, try to
print the stack trace before starting the parsing, e.g.
Exception e = new Exception ();
e.fillInStackTrace ();
e.printStackTrace (System.err);
Hope that helps
Klaus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]