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

Executable model compilation fails with map modification in action

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.24.0.Final, 7.27.0.Final
    • Fix Version/s: None
    • Labels:
    • Environment:
      • 7.24.0.Final and later version
      • building executable model
      • dialect "mvel"
    • Sprint:
      2019 Week 38-40 (from Sep 16)
    • Story Points:
      3
    • Steps to Reproduce:
      Hide

      run attached reproducer with the following command.
      $ mvn clean install -DgenerateModel=YES

      Regarding Error2, comment out line#13 like the following and execute above command.

      13 // m.mapVal[$key] = $status;

      Show
      run attached reproducer with the following command. $ mvn clean install -DgenerateModel=YES Regarding Error2, comment out line#13 like the following and execute above command. 13 // m.mapVal [$key] = $status;
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      The following expression on update of Map in RHS causes an error when building executable model.

      • Pattern1
                      m.mapVal["rule1"] = "value1";
        
      • Error1 (NPE)
      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.24.0.Final:generateModel (default-generateModel) on project build-error: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.24.0.Final:generateModel failed.: NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kie:kie-maven-plugin:7.24.0.Final:generateModel (default-generateModel) on project build-error: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.24.0.Final:generateModel failed.
      

      or

      • Pattern2
                      m.getMapVal().put( "rule2", "value2" );
        
      • Error2
      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.24.0.Final:generateModel (default-generateModel) on project build-error: A type incompatibility occurred while executing org.kie:kie-maven-plugin:7.24.0.Final:generateModel: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
      

      This does not happen with 7.23.0.Final.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  volothamp Luca Molteni
                  Reporter:
                  hiroko Hiroko Miura
                  Tester:
                  Tibor Zimanyi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: