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