You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2000/06/16 15:14:33 UTC
Stack overflow problem
Hello,
I'm getting a stack overflow on one of my cocoon installations (Solaris,
cocoon 1.7.5dev, JServ1.1, JDK1.2.2). On other installations (namely
under Linux) I am not experiencing this problem.
I found out that the problem lies in one of my stylesheets. I have a
recursive <xsl:call-template> thing in there. It is called with a string
like "foobar", does some stuff and then calls itself with "oobar", does
some stuff and calls itself with "obar" and so on until the whole string
is "used up".
I found if I shorten the string, then I don't get the stack overflow.
But, increasing the JVM's memory does not help - it is set to minimum 8
MB and maximum 128 MB anyway.
So, any suggestions how to go about this?
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
Re: Stack overflow problem
Posted by Ulrich Mayring <ul...@denic.de>.
Donald Ball wrote:
>
> In the ideal world, you would not have to do any workarounds - however,
> since you're experiencing a stack overflow with long strings, you need a
> workaround. Again, I'd submit a report to the Xalan developers and either
> try jclark's stuff or try an extension function as a _workaround_. you
> might also post your template on the xsl users list to see if anyone can
> see a useful optimization you could try.
I did send the sample files to the Xalan list, it is probably better to
deal with it there. I wasn't sure what caused the problem at first, but
it must be Xalan. In case anyone on this list is interested, I am
attaching the test files test.xml and test.xsl to this posting. Again:
it does work on Linux with JDK1.2.2 but fails on Solaris (JDK1.2.1_04).
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
Re: Stack overflow problem
Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 19 Jun 2000, Ulrich Mayring wrote:
> Donald Ball wrote:
> >
> > you might try using james clark's xt processor instead and see if you
> > still get a stack overflow. you might also try rewriting your function as
> > a xalan extension function in java or javascript. finally, you might
> > submit a report to the xalan guys just in case it's doing something really
> > pathological.
>
> Hm, it's just a XSLT template that is used liberally in a stylesheet -
> it wouldn't make sense to rewrite a complex XSLT function in Java. After
> all, I wouldn't need XSLT/Xalan then, if I were to write everything in
> Java to begin with :-)
In the ideal world, you would not have to do any workarounds - however,
since you're experiencing a stack overflow with long strings, you need a
workaround. Again, I'd submit a report to the Xalan developers and either
try jclark's stuff or try an extension function as a _workaround_. you
might also post your template on the xsl users list to see if anyone can
see a useful optimization you could try.
- donald
Re: Stack overflow problem
Posted by Ulrich Mayring <ul...@denic.de>.
Donald Ball wrote:
>
> you might try using james clark's xt processor instead and see if you
> still get a stack overflow. you might also try rewriting your function as
> a xalan extension function in java or javascript. finally, you might
> submit a report to the xalan guys just in case it's doing something really
> pathological.
Hm, it's just a XSLT template that is used liberally in a stylesheet -
it wouldn't make sense to rewrite a complex XSLT function in Java. After
all, I wouldn't need XSLT/Xalan then, if I were to write everything in
Java to begin with :-)
Or am I missing something here?
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
Re: Stack overflow problem
Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 16 Jun 2000, Ulrich Mayring wrote:
> Hello,
>
> I'm getting a stack overflow on one of my cocoon installations (Solaris,
> cocoon 1.7.5dev, JServ1.1, JDK1.2.2). On other installations (namely
> under Linux) I am not experiencing this problem.
>
> I found out that the problem lies in one of my stylesheets. I have a
> recursive <xsl:call-template> thing in there. It is called with a string
> like "foobar", does some stuff and then calls itself with "oobar", does
> some stuff and calls itself with "obar" and so on until the whole string
> is "used up".
>
> I found if I shorten the string, then I don't get the stack overflow.
> But, increasing the JVM's memory does not help - it is set to minimum 8
> MB and maximum 128 MB anyway.
>
> So, any suggestions how to go about this?
you might try using james clark's xt processor instead and see if you
still get a stack overflow. you might also try rewriting your function as
a xalan extension function in java or javascript. finally, you might
submit a report to the xalan guys just in case it's doing something really
pathological.
- donald