Bug 152929 engine multi-thread issues
render reports in multi-thread, following exceptions were thrown out in console, java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:61) at java.io.InputStreamReader.<init>(InputStreamReader.java:80) at java.util.Properties.load(Properties.java:266) at org.eclipse.birt.report.engine.parser.HTMLTextParser.<init>(HTMLTextParser.java:108) at org.eclipse.birt.report.engine.parser.TextParser.parse(TextParser.java:111) at org.eclipse.birt.report.engine.layout.pdf.util.HTML2Content.processForeignData(HTML2Content.java:196) at org.eclipse.birt.report.engine.layout.pdf.util.HTML2Content.html2Content(HTML2Content.java:181) at org.eclipse.birt.report.engine.layout.pdf.PDFLayoutManagerFactory$ContentVisitor.visitForeign(PDFLayoutManagerFactory.java:182) at org.eclipse.birt.report.engine.content.impl.ForeignContent.accept(ForeignContent.java:56) at org.eclipse.birt.report.engine.layout.pdf.PDFLayoutManagerFactory.createLayoutManager(PDFLayoutManagerFactory.java:79) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.layoutChildNode(PDFBlockStackingLM.java:93) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.traverseChildren(PDFBlockStackingLM.java:75) at org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:130) at org.eclipse.birt.report.engine.layout.pdf.PDFAbstractLM.layout(PDFAbstractLM.java:134) at org.eclipse.birt.report.engine.layout.pdf.PDFRowLM.traverseChildren(PDFRowLM.java:117) at org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:130) at org.eclipse.birt.report.engine.layout.pdf.PDFAbstractLM.layout(PDFAbstractLM.java:134) at org.eclipse.birt.report.engine.layout.pdf.PDFRowLM.layout(PDFRowLM.java:51) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.layoutChildNode(PDFBlockStackingLM.java:95) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.traverseChildren(PDFBlockStackingLM.java:75) at org.eclipse.birt.report.engine.layout.pdf.PDFTableBandLM.traverseChildren(PDFTableBandLM.java:98) at org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:130) at org.eclipse.birt.report.engine.layout.pdf.PDFAbstractLM.layout(PDFAbstractLM.java:134) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.layoutChildNode(PDFBlockStackingLM.java:95) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.traverseChildren(PDFBlockStackingLM.java:75) at org.eclipse.birt.report.engine.layout.pdf.PDFTableLM.traverseChildren(PDFTableLM.java:146) at org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:130) at org.eclipse.birt.report.engine.layout.pdf.PDFAbstractLM.layout(PDFAbstractLM.java:134) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.layoutChildNode(PDFBlockStackingLM.java:95) at org.eclipse.birt.report.engine.layout.pdf.PDFBlockStackingLM.traverseChildren(PDFBlockStackingLM.java:75) at org.eclipse.birt.report.engine.layout.pdf.PDFStackingLM.layoutChildren(PDFStackingLM.java:130) at org.eclipse.birt.report.engine.layout.pdf.PDFPageLM.layout(PDFPageLM.java:198) at org.eclipse.birt.report.engine.layout.pdf.PDFReportLayoutEngine.layoutReport(PDFReportLayoutEngine.java:55) at org.eclipse.birt.report.engine.layout.pdf.PDFReportLayoutEngine.layout(PDFReportLayoutEngine.java:68) at org.eclipse.birt.report.engine.api.impl.RenderTask.doRender(RenderTask.java:221) at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRender.render(RenderTask.java:635) at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:566) at org.eclipse.birt.test.performance.RenderThread.run(RenderThread.java:167)
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/HTMLTextParser.java
/**
	 * Retrieves the child node by name
	 * 
	 * @param parent
	 *            the parent node
	 * @param childName
	 *            the name of the child node to retrieve
	 * @return null if such node does not exist, otherwise return the specified
	 *         node.
	 */
	private Node getNodeByName( Node parent, String childName )
	{
		for ( Node child = parent.getFirstChild( ); child != null; child = child
				.getNextSibling( ) )
		{
			if ( child.getNodeType( ) == Node.ELEMENT_NODE
					&& childName.equals( child.getNodeName( ) ) )
			{
				return child;
			}
		}
		return null;
	}
	/**
	 * Remove the unsupported tags and convert the JTidy DOM tree to W3C DOM
	 * tree recursively.
	 * 
	 * @param srcNode
	 *            the Node in the JTidy DOM tree
	 * @param desNode