Project

Profile

Help

Bug #6541

open

Optimization bug: ClassCastException: class ObjectToBeSorted cannot be cast to class GroupToBeSorted

Added by Norm Tovey-Walsh 8 days ago. Updated 7 days ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2024-09-19
Due date:
% Done:

0%

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

Description

It took me a little while to work out that this was related to optimization. If you run

java -jar saxon-ee-12.5.jar -s:xml/doclet.xml -xsl:xsl/chunk-xmljavadoc.xsl \
     -o:./result/out base-output=./result

with a license, it crashes:

java.lang.ClassCastException: class [Lnet.sf.saxon.expr.sort.ObjectToBeSorted; cannot be cast to class [Lnet.sf.saxon.expr.sort.GroupToBeSorted; ([Lnet.sf.saxon.expr.sort.ObjectToBeSorted; and [Lnet.sf.saxon.expr.sort.GroupToBeSorted; are in unnamed module of loader 'app')
	at net.sf.saxon.expr.sort.SortedGroupIterator.getSnapShot(SortedGroupIterator.java:91)
	at com.saxonica.config.EnterpriseConfiguration.processResultDocument(EnterpriseConfiguration.java:1924)
	at net.sf.saxon.expr.instruct.ResultDocument$ResultDocumentElaborator.lambda$elaborateForPush$0(ResultDocument.java:958)
	at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6(LetExpression.java:942)
	at net.sf.saxon.expr.instruct.ForEachGroup$ForEachGroupElaborator.lambda$elaborateForPush$6(ForEachGroup.java:889)
	at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$3(Block.java:876)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:376)
	at net.sf.saxon.trans.Mode.handleRuleNotNull(Mode.java:587)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:521)
	at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:684)
	at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:430)
	at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:306)
	at net.sf.saxon.Transform.processFile(Transform.java:1405)
	at net.sf.saxon.Transform.doTransform(Transform.java:894)
...

It works fine without a license, so I conclude it's an EE optimization.


Files

chunk-xmljavadoc.xsl (29.6 KB) chunk-xmljavadoc.xsl Norm Tovey-Walsh, 2024-09-19 17:34
doclet.xml (2.02 MB) doclet.xml Norm Tovey-Walsh, 2024-09-19 17:34

Please register to edit this issue

Also available in: Atom PDF