Hello,
I was finally able to reproduce this error and get the XML that causes it.
Here is a snippet of otherwise normal-looking XML file that causes Xalan-J to
go nuts.
<testcase name="testNonLocalizedContentsAreTheSame" time="0.277">
<failure message="expected:</s/0/en/ads/04.gif GIF 468,60
/s/0/en/ads/05.gif GIF 468,60
/s/0/en/ads/06.gif GIF 468,60
/s/0/en/ads/07.gif GIF 468,60
/s/0/en/ads/11.gif GIF 468,60
...
...
...
A LOT OF LINES LIKE THE ONES ABOVE
...
...
...
/s/9986755/en/img/bmtp4.gif GIF 139,41
/s/9986755/en/img/logo.gif GIF 150,92
>
at junit.framework.Assert.fail(Assert.java:51)
at junit.framework.Assert.failNotEquals(Assert.java:234)
at junit.framework.Assert.assertEquals(Assert.java:68)
at junit.framework.Assert.assertEquals(Assert.java:75)
at
com.blink.blink.locale.DataFileCollectionTest.testNonLocalizedContentsAreTheSame(DataFileCollectionTest.java:332)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:231)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:409)
</failure>
I think the problem is the amount of data within <failure> and </failure>
elements.
There are circa 13150 lines in this element, each looking like the ones above.
Could it be just the sheer amount of data that is causing Xalan to choke?
Thanks,
Otis
On Thu, 01 November 2001, [EMAIL PROTECTED] wrote:
>
>
> I'm not aware of any bugs that would cause this. My knee-jerk reaction is
> that something is going on (possibly a bug fix) that is causing infinite
> recursion in the stylesheet.
>
> I think the way to debug this is:
>
> 1) run outside the ant task, from the command line
> (org.apache.xalan.xslt.Process -in foo.xml -xsl foo.xsl).
> 2) Add the -TT option on the command line.
> 3) See if you can tell which templates are in infinite recursion, and try
> to reason why.
>
> There is an API call, setRecursionLimit(int limit), that might help. But,
> unfortunately, it is not available on the command line.
>
> In general we should be using less stack space than earlier versions of
> Xalan, not more, so I would doubt that is is caused by us using more stack
> space with a stylesheet that is simply deeply recursive.
>
> -scott
>
>
>
>
>
>
> [EMAIL PROTECTED]
>
> .com To: [EMAIL PROTECTED]
>
> cc: (bcc: Scott Boag/CAM/Lotus)
>
> 11/01/2001 Subject: StackOverflowException
> in Xalan 2.2.D11
> 10:40 PM
>
>
>
>
>
>
>
>
>
> Hello,
>
> I am using Xalan-J 2.2.D11 within Ant (1.4.1) and I just started getting
> this StackOverflowException (stack trace below). It looks like something
> is being called recursively, which fits the Javadoc for that error: "Thrown
> when a stack overflow occurs because an application recurses too deeply".
>
> I checked the bugs database and I couldn't find any open bugs mentioning
> StackOverflowException.
>
> Does anyone know what is causing this? Is this a known issue?
>
> I am using Xalan-J 2.2.D11, IBM's latest JDK/JVM on RedHat 7.1, and Ant
> 1.4.1.
>
> Note:
> I did manage to use Xalan for this same purpose successfully before.
> I have not changed the JVM, nor Xalan, nor Ant since then, however.
>
> Any help would be appreciated.
>
> Thanks,
> Otis
> P.S.
> Stack trace:
>
> [junitreport] Using Xalan version: Xalan Java 2.2.D11
>
> BUILD FAILED
>
> java.lang.StackOverflowError
> at org.apache.xalan.serialize.SerializerToXML.characters(Unknown
> Source)
> at org.apache.xalan.serialize.SerializerToHTML.characters(Unknown
> Source)
> at
> org.apache.xalan.transformer.ResultTreeHandler.characters(Unknown Source)
> at
> org.apache.xpath.objects.XString.dispatchCharactersEvents(Unknown Source)
> at org.apache.xpath.Expression.executeCharsToContentHandler(Unknown
> Source)
> at org.apache.xalan.templates.ElemValueOf.execute(Unknown Source)
> at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Unknown
> Source)
> at org.apache.xalan.templates.ElemChoose.execute(Unknown Source)
> at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Unknown
> Source)
> at org.apache.xalan.templates.ElemTemplate.execute(Unknown Source)
> at org.apache.xalan.templates.ElemCallTemplate.execute(Unknown
> Source)
> at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Unknown
> Source)
> at org.apache.xalan.templates.ElemChoose.execute(Unknown Source)
> at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Unknown
> Source)
> at org.apache.xalan.templates.ElemTemplate.execute(Unknown Source)
> ...
> ...
> ...
> at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Unknown
> Source)
> at org.apache.xalan.templates.ElemLiteralResult.execute(Unknown
> Source)
> at
> org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(Unknown
>
> Source)
> at org.apache.xalan.templates.ElemApplyTemplates.execute(Unknown
> Source)
> at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Unknown
> Source)
> at
> org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Unknown
> Source)
> at
> org.apache.xalan.transformer.TransformerImpl.transformNode(Unknown Source)
> at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
> Source)
> at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
> Source)
> at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
> Source)
> at
> org.apache.tools.ant.taskdefs.optional.junit.Xalan2Executor.execute(AggregateTransformer.java:321)
>
> at
> org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:190)
>
> ...
> ...
> ...
>
> _________________________________________________________________
> iVillage.com: Solutions for Your Life
> Check out the most exciting women's community on the Web
> http://www.ivillage.com
_________________________________________________________________
iVillage.com: Solutions for Your Life
Check out the most exciting women's community on the Web
http://www.ivillage.com