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

Executable model compilation fails with map modification in action

XMLWordPrintable

    • 2019 Week 38-40 (from Sep 16)
    • 3
    • 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;
    • NEW
    • NEW

      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.

              lmolteni@redhat.com Luca Molteni
              rhn-support-hmiura Hiroko Miura
              Tibor Zimányi Tibor Zimányi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: