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

Creation of executable model fails when a rule uses custom accumulate function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.12.0.GA
    • 7.10.1.GA
    • BRE
    • All

    • False
    • False
    • ER3
    • -
    • Undefined
    • Hide

      1. Download the attached reproducer (sample-rules.zip) and extract it.
      2. Run mvn clean compile -DgenerateModel=YES on the file system where the reproducer has been extracted.

      Show
      1. Download the attached reproducer (sample-rules.zip) and extract it. 2. Run mvn clean compile -DgenerateModel=YES on the file system where the reproducer has been extracted.
    • 2021 Week 22-24 (from May 31)

      When executing mvn clean compile -DgenerateModel=YES on a Decision Manager project that has a rule using custom accumulate function, the build fails with the following error. Attached is the full maven build log with debug enabled.

      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  5.811 s
      [INFO] Finished at: 2021-06-07T18:22:18+08:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.48.0.Final-redhat-00006:generateModel (default-generateModel) on project gv-rules: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.48.0.Final-redhat-00006:generateModel failed.: NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kie:kie-maven-plugin:7.48.0.Final-redhat-00006:generateModel (default-generateModel) on project gv-rules: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.48.0.Final-redhat-00006:generateModel failed.
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-generateModel of goal org.kie:kie-maven-plugin:7.48.0.Final-redhat-00006:generateModel failed.
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: java.lang.NullPointerException
          at java.lang.Class.isAssignableFrom (Native Method)
          at org.drools.modelcompiler.builder.generator.drlxparse.CoercedExpression.shouldCoerceBToString (CoercedExpression.java:208)
          at org.drools.modelcompiler.builder.generator.drlxparse.CoercedExpression.coerce (CoercedExpression.java:103)
          at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.parseBinaryExpr (ConstraintParser.java:381)
          at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.getDrlxParseResult (ConstraintParser.java:137)
          at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse (ConstraintParser.java:105)
          at org.drools.modelcompiler.builder.generator.visitor.pattern.PatternDSL.findAllConstraint (PatternDSL.java:139)
          at org.drools.modelcompiler.builder.generator.visitor.pattern.PatternDSL.buildPattern (PatternDSL.java:241)
          at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit (ModelGeneratorVisitor.java:145)
          at org.drools.compiler.lang.descr.PatternDescr.accept (PatternDescr.java:303)
          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:187)
          at org.drools.modelcompiler.builder.generator.ModelGenerator.generateModel (ModelGenerator.java:160)
          at org.drools.modelcompiler.builder.ModelBuilderImpl.compileKnowledgePackages (ModelBuilderImpl.java:284)
          at org.drools.modelcompiler.builder.ModelBuilderImpl.buildRules (ModelBuilderImpl.java:220)
          at org.drools.modelcompiler.builder.ModelBuilderImpl.postBuild (ModelBuilderImpl.java:130)
          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:277)
          at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll (KieBuilderImpl.java:245)
          at org.kie.maven.plugin.GenerateModelMojo.generateModel (GenerateModelMojo.java:144)
          at org.kie.maven.plugin.GenerateModelMojo.execute (GenerateModelMojo.java:104)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      

        1. sample-rules.zip
          19 kB
        2. maven-build.log
          118 kB

              mfusco@redhat.com Mario Fusco
              balki404 Balakrishnan Balasubramanian
              Paolo Bizzarri Paolo Bizzarri
              Paolo Bizzarri Paolo Bizzarri
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: