Rodrigo Ribeiro created DROOLS-5966:
---------------------------------------
Summary: [ONE-OFF] (7.9.1)RuntimeException: Unknown expression type:
java.lang.String.class thrown by executable-model
Key: DROOLS-5966
URL:
https://issues.redhat.com/browse/DROOLS-5966
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.46.0.Final
Reporter: Rodrigo Ribeiro
Assignee: Toshiya Kobayashi
Fix For: 7.47.0.Final
In case of executable-model, when a LHS has a method call and its argument is a class
expression:
{noformat}
when
Primitives( eval(classAttr.equals( java.lang.String.class ) ) )
{noformat}
it throws RuntimeException
{noformat}
[ERROR] testJBRULES_2995[KieBase
type=CLOUD_IDENTITY_MODEL_PATTERN](org.drools.mvel.integrationtests.JBRULESTest) Time
elapsed: 1.001 s <<< ERROR!
java.lang.RuntimeException: Unknown expression type: java.lang.String.class
at
org.drools.modelcompiler.builder.generator.DrlxParseUtil.getExpressionType(DrlxParseUtil.java:271)
at
org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.processFirstNode(ExpressionTyper.java:628)
at
org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionFromMethodCallOrField(ExpressionTyper.java:412)
at
org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.parseNodeArguments(ExpressionTyper.java:790)
at
org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.parseMethodCallExpr(ExpressionTyper.java:719)
at
org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.methodCallExpr(ExpressionTyper.java:707)
at
org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionFromMethodCallOrField(ExpressionTyper.java:443)
at
org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:221)
at
org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpression(ExpressionTyper.java:149)
at
org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.getDrlxParseResult(ConstraintParser.java:172)
at
org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:102)
at
org.drools.modelcompiler.builder.generator.visitor.pattern.PatternDSL.findAllConstraint(PatternDSL.java:136)
at
org.drools.modelcompiler.builder.generator.visitor.pattern.PatternDSL.buildPattern(PatternDSL.java:235)
at
org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:145)
at org.drools.compiler.lang.descr.PatternDescr.accept(PatternDescr.java:288)
at
org.drools.modelcompiler.builder.generator.visitor.AndVisitor.visit(AndVisitor.java:50)
at
org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:86)
at
org.drools.modelcompiler.builder.generator.ModelGenerator.processRule(ModelGenerator.java:187)
at
org.drools.modelcompiler.builder.generator.ModelGenerator.generateModel(ModelGenerator.java:160)
at
org.drools.modelcompiler.builder.ModelBuilderImpl.compileKnowledgePackages(ModelBuilderImpl.java:284)
at
org.drools.modelcompiler.builder.ModelBuilderImpl.buildRules(ModelBuilderImpl.java:220)
at
org.drools.modelcompiler.builder.ModelBuilderImpl.postBuild(ModelBuilderImpl.java:130)
at
org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:111)
at
org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:97)
at
org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:268)
at
org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:216)
at
org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:80)
at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:279)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:247)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:204)
at
org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem(KieUtil.java:129)
at
org.drools.testcoverage.common.util.KieUtil.buildAndInstallKieModuleIntoRepo(KieUtil.java:70)
at
org.drools.testcoverage.common.util.KieUtil.buildAndInstallKieModuleIntoRepo(KieUtil.java:64)
at
org.drools.testcoverage.common.util.KieUtil.getKieModuleFromResources(KieUtil.java:231)
at
org.drools.testcoverage.common.util.KieUtil.getKieModuleFromResources(KieUtil.java:220)
at
org.drools.testcoverage.common.util.KieBaseUtil.getKieBaseFromKieModuleFromResources(KieBaseUtil.java:99)
at
org.drools.testcoverage.common.util.KieBaseUtil.getKieBaseFromKieModuleFromDrl(KieBaseUtil.java:112)
at org.drools.mvel.integrationtests.JBRULESTest.testJBRULES_2995(JBRULESTest.java:148)
{noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)