[JBoss JIRA] (DROOLS-3510) Decision table unable to generate rule for row with pattern without constraint
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-3510?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-3510:
--------------------------------
Attachment: MissingConstraint.xls
> Decision table unable to generate rule for row with pattern without constraint
> ------------------------------------------------------------------------------
>
> Key: DROOLS-3510
> URL: https://issues.redhat.com/browse/DROOLS-3510
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.15.0.Final
> Reporter: Andre Piwoni
> Assignee: Mario Fusco
> Priority: Minor
> Attachments: MissingConstraint.xls, failingDecisionTable.xlsx
>
>
> When second condition refers to a field of a variable bound in first condition and there exists row/rule without condition constraint than decision table compiler fails to generate rules. See attachment.
> Expected rules to be generated:
> {code:java}
> rule "Test_1"
> when
> $factA:FactA(hasSomething == "true")
> $numberOfFactsB: Number(this > 0, this <= 1) from accumulate(FactB(x == 1) from $factA.listOfFactsB,count(1))
> then
> insert(X);
> end
> rule "Test_2"
> when
> $factA:FactA(hasSomething == "true")
> $numberOfFactsB: Number(this > 1, this <= 2) from accumulate(FactB(x == 1) from $factA.listOfFactsB,count(1))
> then
> insert(X);
> end
> rule "Test_3"
> when
> $factA:FactA()
> $numberOfFactsB: Number(this > 2, this <= 3) from accumulate(FactB(x == 1) from $factA.listOfFactsB,count(1))
> then
> insert(Y);
> end
> {code}
> Also, there does not seem an alternative way to generate following rule using decision table:
> {code:java}
> rule "Test"
> when
> $factA:FactA($factsB: listOfFactsB)
> $numberOfFactsB: Number(this > 1) from accumulate(FactB(x == 1) from $factsB,count(1))
> then
> insert(Y);
> end
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (DROOLS-3510) Decision table unable to generate rule for row with pattern without constraint
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-3510?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-3510:
--------------------------------
Sprint: 2020 Week 01-03 (from Dec 30)
> Decision table unable to generate rule for row with pattern without constraint
> ------------------------------------------------------------------------------
>
> Key: DROOLS-3510
> URL: https://issues.redhat.com/browse/DROOLS-3510
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.15.0.Final
> Reporter: Andre Piwoni
> Assignee: Mario Fusco
> Priority: Minor
> Attachments: failingDecisionTable.xlsx
>
>
> When second condition refers to a field of a variable bound in first condition and there exists row/rule without condition constraint than decision table compiler fails to generate rules. See attachment.
> Expected rules to be generated:
> {code:java}
> rule "Test_1"
> when
> $factA:FactA(hasSomething == "true")
> $numberOfFactsB: Number(this > 0, this <= 1) from accumulate(FactB(x == 1) from $factA.listOfFactsB,count(1))
> then
> insert(X);
> end
> rule "Test_2"
> when
> $factA:FactA(hasSomething == "true")
> $numberOfFactsB: Number(this > 1, this <= 2) from accumulate(FactB(x == 1) from $factA.listOfFactsB,count(1))
> then
> insert(X);
> end
> rule "Test_3"
> when
> $factA:FactA()
> $numberOfFactsB: Number(this > 2, this <= 3) from accumulate(FactB(x == 1) from $factA.listOfFactsB,count(1))
> then
> insert(Y);
> end
> {code}
> Also, there does not seem an alternative way to generate following rule using decision table:
> {code:java}
> rule "Test"
> when
> $factA:FactA($factsB: listOfFactsB)
> $numberOfFactsB: Number(this > 1) from accumulate(FactB(x == 1) from $factsB,count(1))
> then
> insert(Y);
> end
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (DROOLS-3531) template example nullpointexception when execute maven install command in kjar project
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-3531?page=com.atlassian.jira.plug... ]
Mario Fusco resolved DROOLS-3531.
---------------------------------
Resolution: Out of Date
I tested it with latest release and it works for me. I attached to the ticket a zip file with the maven project with which I tried.
> template example nullpointexception when execute maven install command in kjar project
> --------------------------------------------------------------------------------------
>
> Key: DROOLS-3531
> URL: https://issues.redhat.com/browse/DROOLS-3531
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.16.0.Final
> Reporter: canyu canyu
> Assignee: Mario Fusco
> Priority: Major
> Attachments: template.zip
>
>
> drools-template example changes packaging tag with kjar in pom.xml, adding maven-compiler-plugin. When executes maven install command(-X install), outputs following exception:
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 24.247 s
> [INFO] Finished at: 2019-01-18T17:28:50+08:00
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.16.0.Final:build (default-build) on project drools-rule-mer: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build failed.: NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kie:kie-maven-plugin:7.16.0.Final:build (default-build) on project drools-rule-mer: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
> Caused by: java.lang.NullPointerException
> at org.drools.decisiontable.parser.DefaultRuleSheetListener.flushRule (DefaultRuleSheetListener.java:304)
> at org.drools.decisiontable.parser.DefaultRuleSheetListener.finishSheet (DefaultRuleSheetListener.java:284)
> at org.drools.decisiontable.parser.xls.ExcelParser.finishSheet (ExcelParser.java:285)
> at org.drools.decisiontable.parser.xls.ExcelParser.processSheet (ExcelParser.java:220)
> at org.drools.decisiontable.parser.xls.ExcelParser.parseWorkbook (ExcelParser.java:111)
> at org.drools.decisiontable.parser.xls.ExcelParser.parseFile (ExcelParser.java:85)
> at org.drools.decisiontable.SpreadsheetCompiler.parseResource (SpreadsheetCompiler.java:126)
> at org.drools.decisiontable.SpreadsheetCompiler.compile (SpreadsheetCompiler.java:110)
> at org.drools.decisiontable.SpreadsheetCompiler.compile (SpreadsheetCompiler.java:83)
> at org.drools.decisiontable.DecisionTableProviderImpl.compileResource (DecisionTableProviderImpl.java:78)
> at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource (DecisionTableProviderImpl.java:44)
> at org.drools.compiler.compiler.DecisionTableFactory.loadFromResource (DecisionTableFactory.java:36)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.decisionTableToPackageDescr (KnowledgeBuilderImpl.java:399)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl$ResourceToPkgDescrMapper.lambda$static$4 (CompositeKnowledgeBuilderImpl.java:327)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResource (CompositeKnowledgeBuilderImpl.java:199)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackageDescr (CompositeKnowledgeBuilderImpl.java:186)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build (CompositeKnowledgeBuilderImpl.java:108)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build (CompositeKnowledgeBuilderImpl.java:100)
> at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages (AbstractKieProject.java:251)
> at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify (AbstractKieProject.java:74)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject (KieBuilderImpl.java:267)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll (KieBuilderImpl.java:235)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll (KieBuilderImpl.java:184)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule (KieBuilderImpl.java:438)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule (KieBuilderImpl.java:428)
> at org.kie.maven.plugin.BuildMojo.buildDrl (BuildMojo.java:169)
> at org.kie.maven.plugin.BuildMojo.execute (BuildMojo.java:118)
> 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (DROOLS-3531) template example nullpointexception when execute maven install command in kjar project
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-3531?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-3531:
--------------------------------
Sprint: 2020 Week 01-03 (from Dec 30)
> template example nullpointexception when execute maven install command in kjar project
> --------------------------------------------------------------------------------------
>
> Key: DROOLS-3531
> URL: https://issues.redhat.com/browse/DROOLS-3531
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.16.0.Final
> Reporter: canyu canyu
> Assignee: Mario Fusco
> Priority: Major
> Attachments: template.zip
>
>
> drools-template example changes packaging tag with kjar in pom.xml, adding maven-compiler-plugin. When executes maven install command(-X install), outputs following exception:
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 24.247 s
> [INFO] Finished at: 2019-01-18T17:28:50+08:00
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.16.0.Final:build (default-build) on project drools-rule-mer: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build failed.: NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kie:kie-maven-plugin:7.16.0.Final:build (default-build) on project drools-rule-mer: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
> Caused by: java.lang.NullPointerException
> at org.drools.decisiontable.parser.DefaultRuleSheetListener.flushRule (DefaultRuleSheetListener.java:304)
> at org.drools.decisiontable.parser.DefaultRuleSheetListener.finishSheet (DefaultRuleSheetListener.java:284)
> at org.drools.decisiontable.parser.xls.ExcelParser.finishSheet (ExcelParser.java:285)
> at org.drools.decisiontable.parser.xls.ExcelParser.processSheet (ExcelParser.java:220)
> at org.drools.decisiontable.parser.xls.ExcelParser.parseWorkbook (ExcelParser.java:111)
> at org.drools.decisiontable.parser.xls.ExcelParser.parseFile (ExcelParser.java:85)
> at org.drools.decisiontable.SpreadsheetCompiler.parseResource (SpreadsheetCompiler.java:126)
> at org.drools.decisiontable.SpreadsheetCompiler.compile (SpreadsheetCompiler.java:110)
> at org.drools.decisiontable.SpreadsheetCompiler.compile (SpreadsheetCompiler.java:83)
> at org.drools.decisiontable.DecisionTableProviderImpl.compileResource (DecisionTableProviderImpl.java:78)
> at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource (DecisionTableProviderImpl.java:44)
> at org.drools.compiler.compiler.DecisionTableFactory.loadFromResource (DecisionTableFactory.java:36)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.decisionTableToPackageDescr (KnowledgeBuilderImpl.java:399)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl$ResourceToPkgDescrMapper.lambda$static$4 (CompositeKnowledgeBuilderImpl.java:327)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResource (CompositeKnowledgeBuilderImpl.java:199)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackageDescr (CompositeKnowledgeBuilderImpl.java:186)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build (CompositeKnowledgeBuilderImpl.java:108)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build (CompositeKnowledgeBuilderImpl.java:100)
> at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages (AbstractKieProject.java:251)
> at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify (AbstractKieProject.java:74)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject (KieBuilderImpl.java:267)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll (KieBuilderImpl.java:235)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll (KieBuilderImpl.java:184)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule (KieBuilderImpl.java:438)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule (KieBuilderImpl.java:428)
> at org.kie.maven.plugin.BuildMojo.buildDrl (BuildMojo.java:169)
> at org.kie.maven.plugin.BuildMojo.execute (BuildMojo.java:118)
> 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (DROOLS-3531) template example nullpointexception when execute maven install command in kjar project
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-3531?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-3531:
--------------------------------
Attachment: template.zip
> template example nullpointexception when execute maven install command in kjar project
> --------------------------------------------------------------------------------------
>
> Key: DROOLS-3531
> URL: https://issues.redhat.com/browse/DROOLS-3531
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 7.16.0.Final
> Reporter: canyu canyu
> Assignee: Mario Fusco
> Priority: Major
> Attachments: template.zip
>
>
> drools-template example changes packaging tag with kjar in pom.xml, adding maven-compiler-plugin. When executes maven install command(-X install), outputs following exception:
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 24.247 s
> [INFO] Finished at: 2019-01-18T17:28:50+08:00
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.16.0.Final:build (default-build) on project drools-rule-mer: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build failed.: NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kie:kie-maven-plugin:7.16.0.Final:build (default-build) on project drools-rule-mer: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-build of goal org.kie:kie-maven-plugin:7.16.0.Final:build 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
> Caused by: java.lang.NullPointerException
> at org.drools.decisiontable.parser.DefaultRuleSheetListener.flushRule (DefaultRuleSheetListener.java:304)
> at org.drools.decisiontable.parser.DefaultRuleSheetListener.finishSheet (DefaultRuleSheetListener.java:284)
> at org.drools.decisiontable.parser.xls.ExcelParser.finishSheet (ExcelParser.java:285)
> at org.drools.decisiontable.parser.xls.ExcelParser.processSheet (ExcelParser.java:220)
> at org.drools.decisiontable.parser.xls.ExcelParser.parseWorkbook (ExcelParser.java:111)
> at org.drools.decisiontable.parser.xls.ExcelParser.parseFile (ExcelParser.java:85)
> at org.drools.decisiontable.SpreadsheetCompiler.parseResource (SpreadsheetCompiler.java:126)
> at org.drools.decisiontable.SpreadsheetCompiler.compile (SpreadsheetCompiler.java:110)
> at org.drools.decisiontable.SpreadsheetCompiler.compile (SpreadsheetCompiler.java:83)
> at org.drools.decisiontable.DecisionTableProviderImpl.compileResource (DecisionTableProviderImpl.java:78)
> at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource (DecisionTableProviderImpl.java:44)
> at org.drools.compiler.compiler.DecisionTableFactory.loadFromResource (DecisionTableFactory.java:36)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.decisionTableToPackageDescr (KnowledgeBuilderImpl.java:399)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl$ResourceToPkgDescrMapper.lambda$static$4 (CompositeKnowledgeBuilderImpl.java:327)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResource (CompositeKnowledgeBuilderImpl.java:199)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackageDescr (CompositeKnowledgeBuilderImpl.java:186)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build (CompositeKnowledgeBuilderImpl.java:108)
> at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build (CompositeKnowledgeBuilderImpl.java:100)
> at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages (AbstractKieProject.java:251)
> at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify (AbstractKieProject.java:74)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject (KieBuilderImpl.java:267)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll (KieBuilderImpl.java:235)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll (KieBuilderImpl.java:184)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule (KieBuilderImpl.java:438)
> at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule (KieBuilderImpl.java:428)
> at org.kie.maven.plugin.BuildMojo.buildDrl (BuildMojo.java:169)
> at org.kie.maven.plugin.BuildMojo.execute (BuildMojo.java:118)
> 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:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (LOGTOOL-144) Make JBoss logging annotations accessible at runtime
by Francois JACQUES (Jira)
[ https://issues.redhat.com/browse/LOGTOOL-144?page=com.atlassian.jira.plug... ]
Francois JACQUES commented on LOGTOOL-144:
------------------------------------------
In our specific use case we are looking for the generated message code : prefix-padding-code.
Indeed, the information, while still being in the class file, is not read and stored in the JVM memory. Now it's still possible to read this information using a bytecode reader at runtime. But it seems more fragile and overkill for the use case.
> Make JBoss logging annotations accessible at runtime
> ----------------------------------------------------
>
> Key: LOGTOOL-144
> URL: https://issues.redhat.com/browse/LOGTOOL-144
> Project: Log Tool
> Issue Type: Enhancement
> Reporter: Francois JACQUES
> Priority: Major
>
> Hi,
> We have a use case where we are creating a Java proxy to access meta information of a logger. In this scenario we need to access the `@Message` and `@MessageLogger` annotations at runtime. This is not possible as there retention policy is set to `@Retention(CLASS)`.
> Do you see any problem/value into changing the retention policy to runtime for all annotations in JBoss logging ?
> Thanks
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (LOGTOOL-144) Make JBoss logging annotations accessible at runtime
by James Perkins (Jira)
[ https://issues.redhat.com/browse/LOGTOOL-144?page=com.atlassian.jira.plug... ]
James Perkins commented on LOGTOOL-144:
---------------------------------------
What is the meta information you're looking for? There is overhead with having the retention policy of runtime as the JVM needs to store that information. While I haven't measured the difference I assume this adds to metaspace since it needs to retain the annotation and all the information associated with it.
> Make JBoss logging annotations accessible at runtime
> ----------------------------------------------------
>
> Key: LOGTOOL-144
> URL: https://issues.redhat.com/browse/LOGTOOL-144
> Project: Log Tool
> Issue Type: Enhancement
> Reporter: Francois JACQUES
> Priority: Major
>
> Hi,
> We have a use case where we are creating a Java proxy to access meta information of a logger. In this scenario we need to access the `@Message` and `@MessageLogger` annotations at runtime. This is not possible as there retention policy is set to `@Retention(CLASS)`.
> Do you see any problem/value into changing the retention policy to runtime for all annotations in JBoss logging ?
> Thanks
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (DROOLS-4386) Wrong matched rules set were fired when one of the condition having empty cell in drools 6.5.0 using Jdk 1.8
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-4386?page=com.atlassian.jira.plug... ]
Mario Fusco resolved DROOLS-4386.
---------------------------------
Resolution: Explained
The provided decision table gets internally translated in the following drl
{code}
package rule_table;
//generated from Decision Table
import com.model.Customer;
// rule values at A9, header at A4
rule "Individual = 5y"
when
$customer:Customer($customer.getType() in (INDIVIDUAL), $customer.getYears() >= (5))
then
$customer.setDiscount(15);
end
// rule values at A10, header at A4
rule "Individual = 3y"
when
$customer:Customer($customer.getType() in (INDIVIDUAL), $customer.getYears() >= (3))
then
$customer.setDiscount(10);
end
// rule values at A11, header at A4
rule "Individual = 0y"
when
$customer:Customer($customer.getType() in (INDIVIDUAL))
then
$customer.setDiscount(20);
end
{code}
As you can see in the 3rd rule it correctly generates only one constraint since the other is missing. Given this rule set there's no reason why the 3rd rule shouldn't fire as you described and I believe that drools always worked this way. What more likely is changed is that before it fired the rules in a different order, i.e. in drools 5.x it fired the 3rd rule first and then one of the other 2 so you got the correct result "by chance" and never realized this problem.
> Wrong matched rules set were fired when one of the condition having empty cell in drools 6.5.0 using Jdk 1.8
> ------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-4386
> URL: https://issues.redhat.com/browse/DROOLS-4386
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 6.5.0.Final
> Environment: Windows, Java 1.8 and drools 6.5.0.Final
> Reporter: Rahul Ramachar
> Assignee: Mario Fusco
> Priority: Major
> Attachments: Discount.xls
>
>
> In JDK 1.7 we were using Drools 5.3.0.Final version and we are migrating to jdk 1.8 so drools 5.3.0.Final was not supported in which we were using Package Builder.
> We migrated JDK 1.8 with drools 6.5.0.Final which uses Kie API to implement rules
> Below is the decision table I am using:
> Customer Rule:
> Condition Condition Action
> ---------------------------------------------------
> Rule NO. Type Years Discount
> ---------------------------------------------------
> 1 "Individual" 5 15
> 2 "Individual" 3 10
> 3 "Individual" 20
> if I insert customer object as "Type" = Individual and "Years" = 5
> after fireAllRules
> It fires two rules i.e Rule no. 1 and 3 and gives the 3rd Rule number as result instead of Rule number 1, inturn gives Discount as 20 instead of 15 which is wrong result.
> if I insert customer object as "Type" = Individual and "Years" = 3
> after fireAllRules
> It fires two rules i.e Rule no. 2 and 3 and gives the 3rd rule number as result instead of Rule number 2, inturn gives Discount as 20 instead of 10 which is wrong result.
> Exact rule match is not happening and providing wrong results.
> Could you please give the solution for this it is breaking so many rules in the application.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (DROOLS-4386) Wrong matched rules set were fired when one of the condition having empty cell in drools 6.5.0 using Jdk 1.8
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-4386?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-4386:
--------------------------------
Sprint: 2020 Week 01-03 (from Dec 30)
> Wrong matched rules set were fired when one of the condition having empty cell in drools 6.5.0 using Jdk 1.8
> ------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-4386
> URL: https://issues.redhat.com/browse/DROOLS-4386
> Project: Drools
> Issue Type: Bug
> Components: decision tables
> Affects Versions: 6.5.0.Final
> Environment: Windows, Java 1.8 and drools 6.5.0.Final
> Reporter: Rahul Ramachar
> Assignee: Mario Fusco
> Priority: Major
> Attachments: Discount.xls
>
>
> In JDK 1.7 we were using Drools 5.3.0.Final version and we are migrating to jdk 1.8 so drools 5.3.0.Final was not supported in which we were using Package Builder.
> We migrated JDK 1.8 with drools 6.5.0.Final which uses Kie API to implement rules
> Below is the decision table I am using:
> Customer Rule:
> Condition Condition Action
> ---------------------------------------------------
> Rule NO. Type Years Discount
> ---------------------------------------------------
> 1 "Individual" 5 15
> 2 "Individual" 3 10
> 3 "Individual" 20
> if I insert customer object as "Type" = Individual and "Years" = 5
> after fireAllRules
> It fires two rules i.e Rule no. 1 and 3 and gives the 3rd Rule number as result instead of Rule number 1, inturn gives Discount as 20 instead of 15 which is wrong result.
> if I insert customer object as "Type" = Individual and "Years" = 3
> after fireAllRules
> It fires two rules i.e Rule no. 2 and 3 and gives the 3rd rule number as result instead of Rule number 2, inturn gives Discount as 20 instead of 10 which is wrong result.
> Exact rule match is not happening and providing wrong results.
> Could you please give the solution for this it is breaking so many rules in the application.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months