Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-5590

org.kie:kie-maven-plugin:7.43.0-SNAPSHOT:generateModel failed: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 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
    • Fix Version/s: None
    • Component/s: executable model
    • Labels:
      None

      Description

      When compiling the rules, org.kie:kie-maven-plugin::generateModel fails with sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl

      Given the rule below:

      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

      Fails with the following stack exception:

      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)

       

      As the title says, this error happens on the 7.43.0-SNAPSHOT version as well.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lucamolteni Luca Molteni
                Reporter:
                cchiru Ciprian Chiru
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: