statisticsnorway / java-vtl

An Open Source Java implementation of the Validation Transformation Language, based on the VTL 1.1 draft specification. The implementation follows the JSR-223 Java Scripting API and exposes a simple connector interface one can implement in order to integrate with any data stores. VTL is a standard language for defining validation and transformation rules (set of operators, their syntax and semantics) for any kind of statistical data.
http://java-vtl.org
Apache License 2.0
21 stars 7 forks source link

ComponentBindings cast exception #103

Open hadrienk opened 6 years ago

hadrienk commented 6 years ago
java.lang.ClassCastException: could not cast no.ssb.vtl.script.operations.join.ComponentBindings@31a5ca9ato Component
Line: -1, Column: -1
javax.script.ScriptException: java.lang.ClassCastException: could not cast no.ssb.vtl.script.operations.join.ComponentBindings@31a5ca9ato Component
    at no.ssb.vtl.script.VTLScriptEngine.eval(VTLScriptEngine.java:152)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:212)
    at no.ssb.common.method.executors.vtl.VTLMethodExecutor.eval(VTLMethodExecutor.java:84)
    at no.ssb.common.method.v1.ExecutionIterable.executeAndCache(ExecutionIterable.java:253)
    at no.ssb.common.method.v1.ExecutionIterable.executeScript(ExecutionIterable.java:240)
    at no.ssb.common.method.v1.ExecutionIterable.sendToQueue(ExecutionIterable.java:163)
    at no.ssb.common.method.v1.ExecutionIterable.run(ExecutionIterable.java:143)
    at no.ssb.common.method.v1.services.AsyncExecutorService.lambda$execute$0(AsyncExecutorService.java:111)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:83)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: could not cast no.ssb.vtl.script.operations.join.ComponentBindings@31a5ca9ato Component
    at no.ssb.vtl.script.visitors.ComponentVisitor.convert(ComponentVisitor.java:45)
    at no.ssb.vtl.script.visitors.ComponentVisitor.convert(ComponentVisitor.java:30)
    at no.ssb.vtl.script.visitors.AbstractVariableVisitor.visitVariable(AbstractVariableVisitor.java:79)
    at no.ssb.vtl.parser.VTLParser$VariableContext.accept(VTLParser.java:1456)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at no.ssb.vtl.parser.VTLBaseVisitor.visitVariableExpression(VTLBaseVisitor.java:384)
    at no.ssb.vtl.parser.VTLParser$VariableExpressionContext.accept(VTLParser.java:3033)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at no.ssb.vtl.script.visitors.join.UnfoldVisitor.visitJoinUnfoldExpression(UnfoldVisitor.java:50)
    at no.ssb.vtl.script.visitors.join.UnfoldVisitor.visitJoinUnfoldExpression(UnfoldVisitor.java:37)
    at no.ssb.vtl.parser.VTLParser$JoinUnfoldExpressionContext.accept(VTLParser.java:4683)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at no.ssb.vtl.parser.VTLBaseVisitor.visitJoinUnfoldClause(VTLBaseVisitor.java:587)
    at no.ssb.vtl.parser.VTLParser$JoinUnfoldClauseContext.accept(VTLParser.java:4405)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at no.ssb.vtl.script.visitors.join.JoinBodyVisitor.visitJoinUnfoldClause(JoinBodyVisitor.java:115)
    at no.ssb.vtl.script.visitors.join.JoinBodyVisitor.visitJoinUnfoldClause(JoinBodyVisitor.java:42)
    at no.ssb.vtl.parser.VTLParser$JoinUnfoldClauseContext.accept(VTLParser.java:4405)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at no.ssb.vtl.parser.VTLBaseVisitor.visitJoinBody(VTLBaseVisitor.java:538)
    at no.ssb.vtl.parser.VTLParser$JoinBodyContext.accept(VTLParser.java:4222)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at no.ssb.vtl.script.visitors.join.JoinBodyVisitor.visitJoinExpression(JoinBodyVisitor.java:68)
    at no.ssb.vtl.script.visitors.join.JoinBodyVisitor.visitJoinExpression(JoinBodyVisitor.java:42)
    at no.ssb.vtl.parser.VTLParser$JoinExpressionContext.accept(VTLParser.java:4044)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at no.ssb.vtl.script.visitors.DatasetExpressionVisitor.visitJoinExpression(DatasetExpressionVisitor.java:73)
    at no.ssb.vtl.script.visitors.DatasetExpressionVisitor.visitJoinExpression(DatasetExpressionVisitor.java:40)
    at no.ssb.vtl.parser.VTLParser$JoinExpressionContext.accept(VTLParser.java:4044)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at no.ssb.vtl.parser.VTLBaseVisitor.visitRelationalExpression(VTLBaseVisitor.java:510)
    at no.ssb.vtl.parser.VTLParser$RelationalExpressionContext.accept(VTLParser.java:3912)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at no.ssb.vtl.script.visitors.AssignmentVisitor.visitRelationalExpression(AssignmentVisitor.java:108)
    at no.ssb.vtl.parser.VTLParser$RelationalExpressionContext.accept(VTLParser.java:3912)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at no.ssb.vtl.parser.VTLBaseVisitor.visitWithRelational(VTLBaseVisitor.java:223)
    at no.ssb.vtl.parser.VTLParser$WithRelationalContext.accept(VTLParser.java:1871)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at no.ssb.vtl.script.visitors.AssignmentVisitor.visitAssignment(AssignmentVisitor.java:88)
    at no.ssb.vtl.parser.VTLParser$AssignmentContext.accept(VTLParser.java:290)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at no.ssb.vtl.parser.VTLBaseVisitor.visitStatement(VTLBaseVisitor.java:27)
    at no.ssb.vtl.parser.VTLParser$StatementContext.accept(VTLParser.java:239)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at no.ssb.vtl.script.VTLScriptEngine.run(VTLScriptEngine.java:207)
    at no.ssb.vtl.script.VTLScriptEngine.eval(VTLScriptEngine.java:145)
    ... 12 more