Project

Profile

Help

Bug #3022

closed

Multithreading error: ClassCastException at at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:276)

Added by Oussama Cherif about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Multithreading
Sprint/Milestone:
-
Start date:
2016-11-08
Due date:
% Done:

100%

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

Description

Hello,

We have a very strange issue in our application which is able to run many XSLT transformer instances in separate threads.

When we activated the multi-threading option in our application (It is not related to Saxonica multi-threading option) we had the issue below as shown in the stack trace below :

Caused by: java.lang.ClassCastException: net.sf.saxon.expr.LocalVariableReference cannot be cast to net.sf.saxon.expr.Literal

   at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:276)

   at net.sf.saxon.expr.UserFunctionCall.evaluateArguments(UserFunctionCall.java:624)

   at net.sf.saxon.expr.UserFunctionCall.callFunction(UserFunctionCall.java:495)

   at net.sf.saxon.expr.UserFunctionCall.evaluateItem(UserFunctionCall.java:456)

   at net.sf.saxon.expr.SimpleStepExpression.iterate(SimpleStepExpression.java:110)

   at net.sf.saxon.expr.Expression.process(Expression.java:896)

   at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:658)

   at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:838)

   at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656)

   at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:732)

   at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656)

   at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149)

   at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:366)

   at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:313)

   at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656)

   at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149)

   at net.sf.saxon.expr.ItemChecker.process(ItemChecker.java:249)

   at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:358)

However, in the mono-threading mode there is no error.

Sometimes, when we made some refactoring by decomposing the main function in many sub-methods the error disappeared.

I thank you in advance for your reply.

Regards,


Files

eej.zip (23.1 MB) eej.zip Michael Kay, 2016-11-25 12:25

Please register to edit this issue

Also available in: Atom PDF