]
Luca Molteni updated DROOLS-5590:
---------------------------------
Sprint: 2020 Week 34-36 (from Aug 17)
org.kie:kie-maven-plugin:7.43.0-SNAPSHOT:generateModel failed:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
----------------------------------------------------------------------------------------------------------------------------
Key: DROOLS-5590
URL:
https://issues.redhat.com/browse/DROOLS-5590
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.35.0.Final, 7.36.0.Final, 7.37.0.Final, 7.38.0.Final,
7.39.0.Final, 7.40.0.Final, 7.41.0.Final, 7.42.0.Final
Reporter: Ciprian Chiru
Assignee: Luca Molteni
Priority: Major
When compiling the rules, _org.kie:kie-maven-plugin::generateModel_ fails with
_sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl_
Given the rule below:
{code:java}
import java.util.Map;
import java.util.List;
global java.util.Set controlSet;
rule "will execute per each Measurement having ID color"
no-loop
when
$measurement: Measurement( id == "color", $colorVal : val )
$lst : List() from collect(Measurement())
$selectedList: List() from accumulate(Measurement($m: this) from $lst,
collectList(Map.entry($m, $measurement.getListOfCodes())))
then
controlSet.add($colorVal);
end{code}
Fails with the following stack exception:
{code:java}
Caused by: java.lang.ArrayStoreException:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
at java.util.stream.Nodes$FixedNodeBuilder.accept (Nodes.java:1230)
at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1654)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:484)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:474)
at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:550)
at java.util.stream.AbstractPipeline.evaluateToArrayNode (AbstractPipeline.java:260)
at java.util.stream.ReferencePipeline.toArray (ReferencePipeline.java:517)
at org.drools.modelcompiler.builder.generator.DrlxParseUtil.returnTypeOfMethodCallExpr
(DrlxParseUtil.java:186)
at org.drools.modelcompiler.builder.generator.ToMethodCall.setCursorForMethodCall
(ToMethodCall.java:128)
at org.drools.modelcompiler.builder.generator.ToMethodCall.toMethodCallWithClassCheck
(ToMethodCall.java:71)
at
org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.methodCallExprParameter
(AccumulateVisitor.java:262)
at
org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.parseFirstParameter
(AccumulateVisitor.java:206)
at org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.visit
(AccumulateVisitor.java:186)
at
org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.classicAccumulate
(AccumulateVisitor.java:145)
at org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.visit
(AccumulateVisitor.java:128)
at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit
(ModelGeneratorVisitor.java:139)
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:186)
at org.drools.modelcompiler.builder.generator.ModelGenerator.generateModel
(ModelGenerator.java:159)
at org.drools.modelcompiler.builder.ModelBuilderImpl.compileKnowledgePackages
(ModelBuilderImpl.java:281)
at org.drools.modelcompiler.builder.ModelBuilderImpl.buildRules
(ModelBuilderImpl.java:209)
at org.drools.modelcompiler.builder.ModelBuilderImpl.postBuild
(ModelBuilderImpl.java:129)
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.kie.maven.plugin.GenerateModelMojo.generateModel (GenerateModelMojo.java:146)
at org.kie.maven.plugin.GenerateModelMojo.execute (GenerateModelMojo.java:106)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
(DefaultBuildPluginManager.java:137){code}
As the title says, this error happens on the _7.43.0-SNAPSHOT_ version as well.