Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1550

A new line character between the last parameter and ");" in a method call causes a build error in executable model.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.10.0.GA
    • 7.5.0.GA, 7.5.1.GA, 7.6.0.GA, 7.7.0.GA, 7.7.1.GA, 7.8.0.GA, 7.8.1.GA, 7.9.0.GA
    • BRE
    • This issue occurs on all releases from RHDM 7.5.0 to 7.9.0.

    • False
    • False
    • Release Notes
    • CR1
    • +
    • Undefined
    • Hide
      1. Extract reproducer.
        $ unzip reproducer_model_compiler_4a.zip
        $ cd reproducer_model_compiler_4a
        
      2. Build and execute the rule.
        $ ./run_mvn    # mvn clean compile exec:exec -DgenerateModel=YES
            :
            :
        [INFO] --- kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) @ reproducer_model_compiler_4a ---
            :
            :
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time:  2.847 s
        [INFO] Finished at: 2020-12-28T11:39:18+09:00
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) on project reproducer_model_compiler_4a: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel failed: (line 0,col 0) Parse error. Found "\n", expected one of  "!=" "%" "%=" "&" "&&" "&=" ")" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||"
        [ERROR] Problem stacktrace : 
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.generateParseException(GeneratedMvelParser.java:12225)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.jj_consume_token(GeneratedMvelParser.java:12070)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.Arguments(GeneratedMvelParser.java:3443)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.PrimarySuffixWithoutSuper(GeneratedMvelParser.java:3235)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.PrimarySuffix(GeneratedMvelParser.java:3181)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.PrimaryExpression(GeneratedMvelParser.java:2903)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.StatementExpression(GeneratedMvelParser.java:4021)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.Statement(GeneratedMvelParser.java:3691)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.BlockStatement(GeneratedMvelParser.java:3885)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.Statements(GeneratedMvelParser.java:1413)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.Block(GeneratedMvelParser.java:3797)
        [ERROR]   org.drools.mvel.parser.GeneratedMvelParser.BlockParseStart(GeneratedMvelParser.java:5429)
        [ERROR]   org.drools.mvel.parser.MvelParser.parse(MvelParser.java:148)
        [ERROR]   org.drools.mvel.parser.MvelParser.simplifiedParse(MvelParser.java:266)
        [ERROR]   org.drools.mvel.parser.MvelParser.parseBlock(MvelParser.java:283)
        [ERROR]   org.drools.mvelcompiler.MvelCompiler.compile(MvelCompiler.java:35)
        [ERROR]   org.drools.modelcompiler.builder.generator.Consequence.createExecuteCallMvel(Consequence.java:194)
        [ERROR]   org.drools.modelcompiler.builder.generator.Consequence.createCall(Consequence.java:159)
        [ERROR]   org.drools.modelcompiler.builder.generator.ModelGenerator.processRule(ModelGenerator.java:219)
        [ERROR]   org.drools.modelcompiler.builder.generator.ModelGenerator.generateModel(ModelGenerator.java:159)
        [ERROR]   org.drools.modelcompiler.builder.ModelBuilderImpl.compileKnowledgePackages(ModelBuilderImpl.java:281)
        [ERROR]   org.drools.modelcompiler.builder.ModelBuilderImpl.buildRules(ModelBuilderImpl.java:209)
        [ERROR]   org.drools.modelcompiler.builder.ModelBuilderImpl.postBuild(ModelBuilderImpl.java:129)
        [ERROR]   org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:111)
        [ERROR]   org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:97)
        [ERROR]   org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:268)
        [ERROR]   org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:216)
        [ERROR]   org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:80)
        [ERROR]   org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:279)
        [ERROR]   org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:247)
        [ERROR]   org.kie.maven.plugin.GenerateModelMojo.generateModel(GenerateModelMojo.java:146)
        [ERROR]   org.kie.maven.plugin.GenerateModelMojo.execute(GenerateModelMojo.java:106)
        [ERROR]   org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
        [ERROR]   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
        [ERROR]   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
        [ERROR]   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
        [ERROR]   org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        [ERROR]   org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        [ERROR]   org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
        [ERROR]   org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        [ERROR]   org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
        [ERROR]   org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
        [ERROR]   org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
        [ERROR]   org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
        [ERROR]   org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
        [ERROR]   org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
        [ERROR]   java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        [ERROR]   java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        [ERROR]   java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        [ERROR]   java.base/java.lang.reflect.Method.invoke(Method.java:566)
        [ERROR]   org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
        [ERROR]   org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
        [ERROR]   org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
        [ERROR]   org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
            :
            :
        
      Show
      Extract reproducer. $ unzip reproducer_model_compiler_4a.zip $ cd reproducer_model_compiler_4a Build and execute the rule. $ ./run_mvn # mvn clean compile exec:exec -DgenerateModel=YES : : [INFO] --- kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) @ reproducer_model_compiler_4a --- : : [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.847 s [INFO] Finished at: 2020-12-28T11:39:18+09:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) on project reproducer_model_compiler_4a: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel failed: (line 0,col 0) Parse error. Found "\n", expected one of "!=" "%" "%=" "&" "&&" "&=" ")" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||" [ERROR] Problem stacktrace : [ERROR] org.drools.mvel.parser.GeneratedMvelParser.generateParseException(GeneratedMvelParser.java:12225) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.jj_consume_token(GeneratedMvelParser.java:12070) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.Arguments(GeneratedMvelParser.java:3443) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.PrimarySuffixWithoutSuper(GeneratedMvelParser.java:3235) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.PrimarySuffix(GeneratedMvelParser.java:3181) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.PrimaryExpression(GeneratedMvelParser.java:2903) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.StatementExpression(GeneratedMvelParser.java:4021) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.Statement(GeneratedMvelParser.java:3691) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.BlockStatement(GeneratedMvelParser.java:3885) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.Statements(GeneratedMvelParser.java:1413) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.Block(GeneratedMvelParser.java:3797) [ERROR] org.drools.mvel.parser.GeneratedMvelParser.BlockParseStart(GeneratedMvelParser.java:5429) [ERROR] org.drools.mvel.parser.MvelParser.parse(MvelParser.java:148) [ERROR] org.drools.mvel.parser.MvelParser.simplifiedParse(MvelParser.java:266) [ERROR] org.drools.mvel.parser.MvelParser.parseBlock(MvelParser.java:283) [ERROR] org.drools.mvelcompiler.MvelCompiler.compile(MvelCompiler.java:35) [ERROR] org.drools.modelcompiler.builder.generator.Consequence.createExecuteCallMvel(Consequence.java:194) [ERROR] org.drools.modelcompiler.builder.generator.Consequence.createCall(Consequence.java:159) [ERROR] org.drools.modelcompiler.builder.generator.ModelGenerator.processRule(ModelGenerator.java:219) [ERROR] org.drools.modelcompiler.builder.generator.ModelGenerator.generateModel(ModelGenerator.java:159) [ERROR] org.drools.modelcompiler.builder.ModelBuilderImpl.compileKnowledgePackages(ModelBuilderImpl.java:281) [ERROR] org.drools.modelcompiler.builder.ModelBuilderImpl.buildRules(ModelBuilderImpl.java:209) [ERROR] org.drools.modelcompiler.builder.ModelBuilderImpl.postBuild(ModelBuilderImpl.java:129) [ERROR] org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:111) [ERROR] org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:97) [ERROR] org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:268) [ERROR] org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:216) [ERROR] org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:80) [ERROR] org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:279) [ERROR] org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:247) [ERROR] org.kie.maven.plugin.GenerateModelMojo.generateModel(GenerateModelMojo.java:146) [ERROR] org.kie.maven.plugin.GenerateModelMojo.execute(GenerateModelMojo.java:106) [ERROR] org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) [ERROR] org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) [ERROR] org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) [ERROR] org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) [ERROR] org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) [ERROR] org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) [ERROR] org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) [ERROR] org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) [ERROR] org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) [ERROR] org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) [ERROR] org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) [ERROR] org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) [ERROR] org.apache.maven.cli.MavenCli.main(MavenCli.java:193) [ERROR] java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] java.base/java.lang.reflect.Method.invoke(Method.java:566) [ERROR] org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) [ERROR] org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) [ERROR] org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) [ERROR] org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) : :
    • 2020 Week 52-03 (from Dec 21)

      Building a rule written in MVEL dialect like (*1) containing a new line character between the last parameter and ); in a method call like (*1-1) in executable rule model, a build error (*2) occurs. This issue does not occur when:

      • we build the rule with executable model disabled.
      • the rule is written in Java dialect.
      • the method takes only 1 parameter.

      (*1)

      package com.example.reproducer
      
      dialect "mvel"
      
      rule "rule4a2"
          when
              $fact : Fact()
          then
              $fact.method2("message1", "message2"
      );                                              // ..... (*1-1)
      end
      

      (*2)

      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel (default-generateModel) on project reproducer_model_compiler_4a: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.44.0.Final-redhat-00003:generateModel failed: (line 0,col 0) Parse error. Found "\n", expected one of  "!=" "%" "%=" "&" "&&" "&=" ")" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||"
      

              mfusco@redhat.com Mario Fusco
              rhn-support-myoshida Masato Yoshida
              Daniel Rosa Daniel Rosa
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: