[JBoss JIRA] (DROOLS-3575) executable-model: compilation fails if there are multiple update() for the same object in RHS.
by Hiroko Miura (Jira)
Hiroko Miura created DROOLS-3575:
------------------------------------
Summary: executable-model: compilation fails if there are multiple update() for the same object in RHS.
Key: DROOLS-3575
URL: https://issues.jboss.org/browse/DROOLS-3575
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.14.0.Final
Environment: - RHDM 7.2.0
Reporter: Hiroko Miura
Assignee: Luca Molteni
Attachments: HelloWorld.zip
compilation fails with the following DRL.
{noformat}
package com.sample;
//generated from Decision Table
import com.sample.Message;
// rule values at C11, header at C6
rule "HelloWorldXLS_11"
when
m:Message(status == Message.HELLO)
then
System.out.println(m.getMsg());
m.setMsg("Goodbye cruel world");update(m);
m.setStatus(Message.GOODBYE);update(m);
end
// rule values at C12, header at C6
rule "HelloWorldXLS_12"
when
m:Message(status == Message.GOODBYE)
then
System.out.println(m.getMsg());
end
{noformat}
Here is an ERROR.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile-1) on project HelloWorld: Compilation failure
[ERROR] /tmp/HelloWorld/target/generated-sources/drools-model-compiler/main/java/com/sample/Rules47274848713b466c9cc49fe299a57c35RuleMethods0.java:[76,40] variable mask_m is already defined in method rule_HelloWorldXLS__11()
and problematic source which is generated.
{noformat}
public static org.drools.model.Rule rule_HelloWorldXLS__11() {
final org.drools.model.Variable<com.sample.Message> var_m = D.declarationOf(com.sample.Message.class,
"m");
final org.drools.model.BitMask mask_m = org.drools.model.BitMask.getPatternMask(com.sample.Message.class,
"msg");
final org.drools.model.BitMask mask_m = org.drools.model.BitMask.getPatternMask(com.sample.Message.class,
"msg",
"status");
org.drools.model.Rule rule = D.rule("com.sample",
"HelloWorldXLS_11").build(D.pattern(var_m).expr("$expr$1$",
(_this) -> _this.getStatus() == Message.HELLO,
D.reactOn("status")),
D.on(var_m).execute((drools, m) -> {
System.out.println(m.getMsg());
m.setMsg("Goodbye cruel world");
drools.update(m,
mask_m);
m.setStatus(Message.GOODBYE);
drools.update(m,
mask_m);
}));
return rule;
}
{noformat}
If first update() (which is just after m.setMsg()) is removed, compilation works.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (DROOLS-3574) executable-model: compilation fails if there are multiple update() for the same object in RHS.
by Hiroko Miura (Jira)
Hiroko Miura created DROOLS-3574:
------------------------------------
Summary: executable-model: compilation fails if there are multiple update() for the same object in RHS.
Key: DROOLS-3574
URL: https://issues.jboss.org/browse/DROOLS-3574
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.14.0.Final
Environment: - RHDM 7.2.0
Reporter: Hiroko Miura
Assignee: Luca Molteni
Attachments: HelloWorld.zip
compilation fails with the following DRL.
{noformat}
package com.sample;
//generated from Decision Table
import com.sample.Message;
// rule values at C11, header at C6
rule "HelloWorldXLS_11"
when
m:Message(status == Message.HELLO)
then
System.out.println(m.getMsg());
m.setMsg("Goodbye cruel world");update(m);
m.setStatus(Message.GOODBYE);update(m);
end
// rule values at C12, header at C6
rule "HelloWorldXLS_12"
when
m:Message(status == Message.GOODBYE)
then
System.out.println(m.getMsg());
end
{noformat}
Here is an ERROR.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile-1) on project HelloWorld: Compilation failure
[ERROR] /tmp/HelloWorld/target/generated-sources/drools-model-compiler/main/java/com/sample/Rules47274848713b466c9cc49fe299a57c35RuleMethods0.java:[76,40] variable mask_m is already defined in method rule_HelloWorldXLS__11()
and problematic source which is generated.
{noformat}
public static org.drools.model.Rule rule_HelloWorldXLS__11() {
final org.drools.model.Variable<com.sample.Message> var_m = D.declarationOf(com.sample.Message.class,
"m");
final org.drools.model.BitMask mask_m = org.drools.model.BitMask.getPatternMask(com.sample.Message.class,
"msg");
final org.drools.model.BitMask mask_m = org.drools.model.BitMask.getPatternMask(com.sample.Message.class,
"msg",
"status");
org.drools.model.Rule rule = D.rule("com.sample",
"HelloWorldXLS_11").build(D.pattern(var_m).expr("$expr$1$",
(_this) -> _this.getStatus() == Message.HELLO,
D.reactOn("status")),
D.on(var_m).execute((drools, m) -> {
System.out.println(m.getMsg());
m.setMsg("Goodbye cruel world");
drools.update(m,
mask_m);
m.setStatus(Message.GOODBYE);
drools.update(m,
mask_m);
}));
return rule;
}
{noformat}
If first update() (which is just after m.setMsg()) is removed, compilation works.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (WFCORE-4299) Creating SNI context requires 'host-context-map' attribute defined
by Chao Wang (Jira)
[ https://issues.jboss.org/browse/WFCORE-4299?page=com.atlassian.jira.plugi... ]
Chao Wang commented on WFCORE-4299:
-----------------------------------
This is duplicate issue of WFCORE-4223 which is fixed in WFCORE 8.0.0.Beta2.
> Creating SNI context requires 'host-context-map' attribute defined
> ------------------------------------------------------------------
>
> Key: WFCORE-4299
> URL: https://issues.jboss.org/browse/WFCORE-4299
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Affects Versions: 7.0.0.Final
> Reporter: Jan Stourac
> Assignee: Chao Wang
> Priority: Major
>
> When one want to create a server-ssl-sni-context, there are two attributes for such resource:
> * default-ssl-context - this one is marked as required
> * host-context-map - not marked as required
> Still, when I try to create server-ssl-sni-context without specifying 'host-context-map', the operation fails with following (see repro steps for further info):
> {code}
> $ ./bin/jboss-cli.sh -c "/subsystem=elytron/server-ssl-sni-context=sniContext:add(default-ssl-context=newServerSSLContext)"
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException",
> "rolled-back" => true
> }
> {code}
> in server log there is following:
> {code}
> 09:08:08,228 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "elytron"),
> ("server-ssl-sni-context" => "sniContext")
> ]): java.lang.IllegalArgumentException
> at org.jboss.dmr.ModelValue.getKeys(ModelValue.java:139)
> at org.jboss.dmr.ModelNode.keys(ModelNode.java:1580)
> at org.wildfly.extension.elytron.SSLDefinitions$7.getValueSupplier(SSLDefinitions.java:1046)
> at org.wildfly.extension.elytron.TrivialAddHandler.performRuntime(TrivialAddHandler.java:68)
> at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:159)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1411)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
> at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:255)
> at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:240)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:138)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:162)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:158)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:313)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:270)
> at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
> at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:158)
> at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
> at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (WFCORE-4299) Creating SNI context requires 'host-context-map' attribute defined
by Chao Wang (Jira)
[ https://issues.jboss.org/browse/WFCORE-4299?page=com.atlassian.jira.plugi... ]
Chao Wang resolved WFCORE-4299.
-------------------------------
Fix Version/s: 8.0.0.Beta2
Resolution: Duplicate Issue
> Creating SNI context requires 'host-context-map' attribute defined
> ------------------------------------------------------------------
>
> Key: WFCORE-4299
> URL: https://issues.jboss.org/browse/WFCORE-4299
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Affects Versions: 7.0.0.Final
> Reporter: Jan Stourac
> Assignee: Chao Wang
> Priority: Major
> Fix For: 8.0.0.Beta2
>
>
> When one want to create a server-ssl-sni-context, there are two attributes for such resource:
> * default-ssl-context - this one is marked as required
> * host-context-map - not marked as required
> Still, when I try to create server-ssl-sni-context without specifying 'host-context-map', the operation fails with following (see repro steps for further info):
> {code}
> $ ./bin/jboss-cli.sh -c "/subsystem=elytron/server-ssl-sni-context=sniContext:add(default-ssl-context=newServerSSLContext)"
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException",
> "rolled-back" => true
> }
> {code}
> in server log there is following:
> {code}
> 09:08:08,228 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "elytron"),
> ("server-ssl-sni-context" => "sniContext")
> ]): java.lang.IllegalArgumentException
> at org.jboss.dmr.ModelValue.getKeys(ModelValue.java:139)
> at org.jboss.dmr.ModelNode.keys(ModelNode.java:1580)
> at org.wildfly.extension.elytron.SSLDefinitions$7.getValueSupplier(SSLDefinitions.java:1046)
> at org.wildfly.extension.elytron.TrivialAddHandler.performRuntime(TrivialAddHandler.java:68)
> at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:159)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1411)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
> at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:255)
> at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:240)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:138)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:162)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:158)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:313)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:270)
> at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
> at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:158)
> at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
> at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (WFCORE-4299) Creating SNI context requires 'host-context-map' attribute defined
by Chao Wang (Jira)
[ https://issues.jboss.org/browse/WFCORE-4299?page=com.atlassian.jira.plugi... ]
Chao Wang reassigned WFCORE-4299:
---------------------------------
Assignee: Chao Wang
> Creating SNI context requires 'host-context-map' attribute defined
> ------------------------------------------------------------------
>
> Key: WFCORE-4299
> URL: https://issues.jboss.org/browse/WFCORE-4299
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Affects Versions: 7.0.0.Final
> Reporter: Jan Stourac
> Assignee: Chao Wang
> Priority: Major
>
> When one want to create a server-ssl-sni-context, there are two attributes for such resource:
> * default-ssl-context - this one is marked as required
> * host-context-map - not marked as required
> Still, when I try to create server-ssl-sni-context without specifying 'host-context-map', the operation fails with following (see repro steps for further info):
> {code}
> $ ./bin/jboss-cli.sh -c "/subsystem=elytron/server-ssl-sni-context=sniContext:add(default-ssl-context=newServerSSLContext)"
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException",
> "rolled-back" => true
> }
> {code}
> in server log there is following:
> {code}
> 09:08:08,228 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "elytron"),
> ("server-ssl-sni-context" => "sniContext")
> ]): java.lang.IllegalArgumentException
> at org.jboss.dmr.ModelValue.getKeys(ModelValue.java:139)
> at org.jboss.dmr.ModelNode.keys(ModelNode.java:1580)
> at org.wildfly.extension.elytron.SSLDefinitions$7.getValueSupplier(SSLDefinitions.java:1046)
> at org.wildfly.extension.elytron.TrivialAddHandler.performRuntime(TrivialAddHandler.java:68)
> at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:159)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1411)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
> at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:255)
> at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:240)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:138)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:162)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:158)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:313)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:270)
> at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
> at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:158)
> at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
> at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (DROOLS-2311) Drools Engine not able to load rules in spring-Boot project
by Akash Chandwani (Jira)
[ https://issues.jboss.org/browse/DROOLS-2311?page=com.atlassian.jira.plugi... ]
Akash Chandwani commented on DROOLS-2311:
-----------------------------------------
Yes it works using `java -jar` command as well :)
> Drools Engine not able to load rules in spring-Boot project
> -----------------------------------------------------------
>
> Key: DROOLS-2311
> URL: https://issues.jboss.org/browse/DROOLS-2311
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.5.0.Final
> Reporter: Chandresh Mishra
> Assignee: Mario Fusco
> Priority: Major
> Attachments: Drools-Issue.rar
>
>
> am using the Drools 7.5.0-final in the spring Boot project.
> I am working on a multi-module Gradle project. Rules and kmodule.xml is present in the sub-module project. This module is packaged as a Jar inside a fat spring boot Jar file.
> I am building the container from the classpath.
> KieContainer kContainer = kieService.newKieClasspathContainer();
> on server start-up (java -jar) it loads the Kmodule.xml and prints all the kbase and sessionName.
> But when I fire rules it returns zero rules fired.
> It works fine when I run as spring boot app from Eclipse. Please help.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (DROOLS-2311) Drools Engine not able to load rules in spring-Boot project
by hari ganesh (Jira)
[ https://issues.jboss.org/browse/DROOLS-2311?page=com.atlassian.jira.plugi... ]
hari ganesh commented on DROOLS-2311:
-------------------------------------
Have you tried running your boot app using command Java -jar?
> Drools Engine not able to load rules in spring-Boot project
> -----------------------------------------------------------
>
> Key: DROOLS-2311
> URL: https://issues.jboss.org/browse/DROOLS-2311
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.5.0.Final
> Reporter: Chandresh Mishra
> Assignee: Mario Fusco
> Priority: Major
> Attachments: Drools-Issue.rar
>
>
> am using the Drools 7.5.0-final in the spring Boot project.
> I am working on a multi-module Gradle project. Rules and kmodule.xml is present in the sub-module project. This module is packaged as a Jar inside a fat spring boot Jar file.
> I am building the container from the classpath.
> KieContainer kContainer = kieService.newKieClasspathContainer();
> on server start-up (java -jar) it loads the Kmodule.xml and prints all the kbase and sessionName.
> But when I fire rules it returns zero rules fired.
> It works fine when I run as spring boot app from Eclipse. Please help.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months