Bug #3625
closedBytecode generation for regular expression fails NoSuchMethodException
100%
Description
Hi,
The attached XSLT fails with the byte code generation enabled:
C:\test>java -classpath saxon9ee.jar net.sf.saxon.Transform -it:main -t -xsl:test.xsl --generateByteCode:on
Saxon-EE 9.8.0.7J from Saxonica
Java version 1.8.0_151
Using license serial number V005669
Exception in thread "main" java.lang.AssertionError: java.lang.NoSuchMethodException: net.sf.saxon.Platform.compileRegularExpression(java.lang.CharSequence, java.lang.String, java.lang.String, java.util.List)
at com.saxonica.ee.bytecode.util.Generator.invokeInstanceMethod(Generator.java:299)
at com.saxonica.ee.bytecode.AnalyzeStringCompiler.compileToIterator(AnalyzeStringCompiler.java:42)
at com.saxonica.ee.bytecode.util.CompilerService.compileToIterator(CompilerService.java:804)
at com.saxonica.ee.bytecode.util.CompilerService.compileToByteCode(CompilerService.java:575)
at com.saxonica.ee.optim.OptimizerEE.compileToByteCode(OptimizerEE.java:1481)
at net.sf.saxon.style.XSLFunction.generateByteCode(XSLFunction.java:488)
at net.sf.saxon.style.PrincipalStylesheetModule.compile(PrincipalStylesheetModule.java:1412)
at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:328)
at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:258)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:106)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:739)
at net.sf.saxon.Transform.doTransform(Transform.java:709)
at net.sf.saxon.Transform.main(Transform.java:81)
Caused by: java.lang.NoSuchMethodException: net.sf.saxon.Platform.compileRegularExpression(java.lang.CharSequence, java.lang.String, java.lang.String, java.util.List)
at java.lang.Class.getMethod(Unknown Source)
at com.saxonica.ee.bytecode.util.Generator.invokeInstanceMethod(Generator.java:289)
... 12 more
Updated by Michael Kay over 6 years ago
- Applies to branch 9.8, trunk added
The problem occurs when (a) the regular expression is not known statically, and (b) the xsl:analyze-string instruction is evaluated in "pull" mode (typically when it occurs within xsl:function or xsl:variable).
Updated by Michael Kay over 6 years ago
- Status changed from New to Resolved
- Fix Committed on Branch 9.8, trunk added
Updated by O'Neil Delpratt about 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.8.0.8 added
Bug fix applied in the Saxon 9.8.0.8 maintenance release.
Please register to edit this issue