[jdom-interest] Threads hangs on XMLOutputter(Format)

Tim.Adler at Bertelsmann.de Tim.Adler at Bertelsmann.de
Thu Apr 8 02:44:40 PDT 2004

Hello everybody!

I'm using JDOM in a multithreaded analysis environment, to create an
XML-structure from my analysis-result. 
I would like to use the Pretty Format for that, but I got a problem:

I use this very simple (not finished) code to convert my result: 

private String convertToXml(AnalysisResultSet ars) throws IOException
Namespace ns =
Element root = new Element("analysis-result",ns);
DocType docType = new DocType("analysis-result","analysis-result.dtd");
Document doc = new Document(root,docType);
Format f = Format.getPrettyFormat();
XMLOutputter out = new XMLOutputter(f); <------------------ hangs here
return out.outputString(doc);

The Threads starts hanging in the marked line, whenver I use the contructor
WITH Format. When I use one without, it works fine.
Does anybody got an idea on this? I was thinking about some Thread-monitor
that blocks the Fornat-access, but there is nothing synchronized in there.
I'm clueless. 

Thx for any help!
Tim Adler, Abt. SDA1
Adress Management Solutions
AZ | Direct
Carl-Bertelsmann Straße 161s
D-33311 Gütersloh

Tel.: 05241/ 80 - 89574
tim.adler at bertelsmann.de 

More information about the jdom-interest mailing list