Page 1 of 1

Saxon StackOverflowError

Posted: Thu Aug 07, 2014 4:00 pm
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

Re: Saxon StackOverflowError

Posted: Mon Aug 11, 2014 1:16 pm
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

Re: Saxon StackOverflowError

Posted: Fri Dec 05, 2014 11:29 pm
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?

Re: Saxon StackOverflowError

Posted: Mon Dec 08, 2014 9:28 am
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

Re: Saxon StackOverflowError

Posted: Mon Dec 08, 2014 9:31 am
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