Saxon StackOverflowError

Here should go questions about transforming XML with XSLT and FOP.
PhillyNJ
Posts: 3
Joined: Thu Aug 07, 2014 3:17 pm

Saxon StackOverflowError

Post by PhillyNJ »

Hi,

I have just inherited a large xslt/Fo project. I am porting the project to use <oXygen/> XML Developer 16.0, build 2014070913. My version of Oxygen uses Saxon-EE 9.5.1.5. When I run the transformation I get a StackOverflowError error.

Code: Select all


Description: java.lang.StackOverflowError
However when I run the same transformation using Saxon 9.0.7 from the command line, the transformation runs fine. My questions are:

How do I troubleshoot this error in Oxygen? Normally the error indicates I have some template recursions that are bad.

Also, can I change to an older version of Saxon?

Thanks
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Saxon StackOverflowError

Post by Radu »

Hi,

Please see some answers below:
How do I troubleshoot this error in Oxygen? Normally the error indicates I have some template recursions that are bad.
It's indeed possible that the XSLT has highly recursive template call inside it.
Or there's a bug in Saxon.
If possible you can send us some XML+XSL samples to support@oxygenxml.com and we'll try to take a look at it.
The -Xss stack size for the Oxygen application can also be increased:

http://www.oxygenxml.com/doc/ug-oxygen/ ... stack.html
Also, can I change to an older version of Saxon?
Unfortunately not, you cannot simply replace the Saxon library bundled Oxygen with another one.
In the Oxygen Preferences->XML / XSLT-FO-XQuery / Custom Engines page you can define a custom XSLT engine and use it for transformation but edited stylesheets will still be validated with the bundled Saxon library. Also the XSLT debugger will work with the bundled Saxon library.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bw251
Posts: 9
Joined: Mon Jul 22, 2013 5:54 pm

Re: Saxon StackOverflowError

Post by bw251 »

I have found the same problem, and attribute it to Saxon's change of regex engine in 9.5 (see http://dev.saxonica.com/blog/mike/2014/ ... write.html ) It looks like Saxon 9.6 has an improved engine though.

Will oXygen be adopting Saxon 9.6 in the next release?
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Saxon StackOverflowError

Post by Radu »

Hi,

Yes, Oxygen 17.0 which will be released in the Spring of 2015 will come bundled with the latest stable version of Saxon 9.6.
But of course I'm not sure if this fixes the problem or not. You can try to download Saxon 9.6 and run it from the command line on your XSLTs.

The first post on this thread was about recursive achieved through template calls.

Your post is about applied regular expressions which indeed may lead to lots of recursion in the Regexp engine. Sometimes this can be avoided by redesigning the regular expression, other times you just need to increase the size of the stack used by the application, as I explained in my previous reply (and you could also try that).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Saxon StackOverflowError

Post by Radu »

Hi,

One more thing, if you are interested in testing an Oxygen 17.0 beta (with Saxon 9.6) just write us to support@oxygenxml.com and we'll try to provide one for you.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply