Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.6
-
None
-
2.8GHZ P4, Windows XP SP1, 1GB RAM, JDK 1.4.2_08 (SUN), Xerces-J 2.6.2, Xalan Java 2.6.0
Description
Under heavy load (multi-threads), xsl transformations get corrupted. Each thread shares a single cached Templates object and calls newTransformer() to obtain unique Transformer objects. No errors occur if there is no call-template usage in the xsl.
Please see attached JUnit test, example.xml, and example.xsl. The test fails within the first few seconds of running.
Here is the expected vs actual results:
EXPECTED: <?xml version="1.0" encoding="UTF-8"?>
<transformedDateList>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<year>2004</year>
<year>2005</year>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<year>2009</year>
<year>2010</year>
</transformedDateList>
RECEIVED: <?xml version="1.0" encoding="UTF-8"?>
<transformedDateList>
<year>2001</year>
<year>2002</year>
<year>2001</year> <---This should have been 2003.
<year>2004</year>
<year>2005</year>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<year>2009</year>
<year>2010</year>
</transformedDateList>
junit.framework.ComparisonFailure: expected:<...3...> but was:<...1...>