Project

Profile

Help

Bug #3625

closed

Bytecode generation for regular expression fails NoSuchMethodException

Added by Michael Kay over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2018-01-16
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

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
Actions #2

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).

Actions #3

Updated by Michael Kay over 6 years ago

  • Status changed from New to Resolved
  • Fix Committed on Branch 9.8, trunk added
Actions #4

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

Also available in: Atom PDF