[JBoss JIRA] (DROOLS-353) Evaluation of the RHS in a rule with multiple matches using noloop and update gets cut short
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-353?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on DROOLS-353:
------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> changed the Status of [bug 1034094|https://bugzilla.redhat.com/show_bug.cgi?id=1034094] from ASSIGNED to MODIFIED
> Evaluation of the RHS in a rule with multiple matches using noloop and update gets cut short
> --------------------------------------------------------------------------------------------
>
> Key: DROOLS-353
> URL: https://issues.jboss.org/browse/DROOLS-353
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Fix For: 6.0.1.Final
>
>
> If you have a rule with both noloop and update where there are multiple matches on the LHS, the RHS only runs for first match instead of running for all matches. The following example shows the problem:
> {code}
> @Test
> public void testMultipleNoLoop1() {
> String str =
> "import org.drools.compiler.Person\n" +
> "rule R no-loop\n" +
> "when\n" +
> " String()\n" +
> " $p : Person( $age : age )\n" +
> "then\n" +
> " modify($p) { setAge( $age + 1 ) }\n" +
> "end\n";
>
> KnowledgeBase kbase = loadKnowledgeBaseFromString(str);
> StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
>
> Person mario = new Person("Mario", 38);
>
> ksession.insert("a");
> ksession.insert("b");
> ksession.insert(mario);
> ksession.fireAllRules();
>
> assertEquals(40, mario.getAge());
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 5 months
[JBoss JIRA] (DROOLS-350) Incremental compilation is not correctly synchronized
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-350?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on DROOLS-350:
------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> changed the Status of [bug 1033612|https://bugzilla.redhat.com/show_bug.cgi?id=1033612] from ASSIGNED to MODIFIED
> Incremental compilation is not correctly synchronized
> -----------------------------------------------------
>
> Key: DROOLS-350
> URL: https://issues.jboss.org/browse/DROOLS-350
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Fix For: 6.0.1.Final
>
>
> Incremental compilation is not correctly synchronized and then a kiesession can fire when the underlying rule base is in an inconsistent state. The test case below shows the problem
> {code}
> @Test(timeout = 10000)
> public void testIncrementalCompilationSynchronization() throws Exception {
> final KieServices kieServices = KieServices.Factory.get();
> ReleaseId releaseId = kieServices.newReleaseId("org.kie.test", "sync-scanner-test", "1.0.0");
> createAndDeployJar( kieServices, releaseId, createDRL("rule0") );
> final KieContainer kieContainer = kieServices.newKieContainer(releaseId);
> KieSession kieSession = kieContainer.newKieSession();
> List<String> list = new ArrayList<String>();
> kieSession.setGlobal("list", list);
> kieSession.fireAllRules();
> kieSession.dispose();
> assertEquals(1, list.size());
> Thread t = new Thread(new Runnable() {
> @Override
> public void run() {
> for (int i = 1; i < 10; i++) {
> ReleaseId releaseId = kieServices.newReleaseId("org.kie.test", "sync-scanner-test", "1.0." + i);
> createAndDeployJar( kieServices, releaseId, createDRL("rule" + i) );
> kieContainer.updateToVersion(releaseId);
> }
> }
> });
> t.setDaemon(true);
> t.start();
> while (true) {
> kieSession = kieContainer.newKieSession();
> list = new ArrayList<String>();
> kieSession.setGlobal("list", list);
> kieSession.fireAllRules();
> kieSession.dispose();
> assertEquals(1, list.size());
> if (list.get(0).equals("rule9")) {
> break;
> }
> }
> }
> private String createDRL(String ruleName) {
> return "package org.kie.test\n" +
> "global java.util.List list\n" +
> "rule " + ruleName + "\n" +
> "when\n" +
> "then\n" +
> "list.add( drools.getRule().getName() );\n" +
> "end\n";
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 5 months
[JBoss JIRA] (WFLY-1997) NPE executing domain operation
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-1997?page=com.atlassian.jira.plugin.... ]
Brian Stansberry updated WFLY-1997:
-----------------------------------
Fix Version/s: (was: 8.0.0.CR1)
> NPE executing domain operation
> ------------------------------
>
> Key: WFLY-1997
> URL: https://issues.jboss.org/browse/WFLY-1997
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Reporter: Heiko Braun
> Assignee: Emanuel Muckenhuber
>
> {noformat}
> [ERROR] Request
> [ERROR] {
> [ERROR] "operation" => "composite",
> [ERROR] "address" => [],
> [ERROR] "steps" => [
> [ERROR] {
> [ERROR] "address" => [("server-group" => "*")],
> [ERROR] "operation" => "read-resource-description",
> [ERROR] "access-control" => "trim-descriptions",
> [ERROR] "operations" => true
> [ERROR] },
> [ERROR] {
> [ERROR] "address" => [
> [ERROR] ("host" => "master"),
> [ERROR] ("server" => "*")
> [ERROR] ],
> [ERROR] "operation" => "read-resource-description",
> [ERROR] "access-control" => "trim-descriptions",
> [ERROR] "operations" => true
> [ERROR] },
> [ERROR] {
> [ERROR] "address" => [("extension" => "*")],
> [ERROR] "operation" => "read-resource-description",
> [ERROR] "access-control" => "trim-descriptions",
> [ERROR] "operations" => true
> [ERROR] }
> [ERROR] ],
> [ERROR] "operation-headers" => {"roles" => "OPERATOR"}
> [ERROR] }
> {noformat}
> leads to
> {noformat}
> [Host Controller] 16:34:53,544 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-12) JBAS014612: Operation ("composite") failed - address: ([]): java.lang.NullPointerException
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.HostControllerExecutionSupport$Factory.create(HostControllerExecutionSupport.java:167)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.HostControllerExecutionSupport$Factory.create(HostControllerExecutionSupport.java:181)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationSlaveStepHandler.addSteps(OperationSlaveStepHandler.java:108)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationCoordinatorStepHandler.executeTwoPhaseOperation(OperationCoordinatorStepHandler.java:201)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationCoordinatorStepHandler.execute(OperationCoordinatorStepHandler.java:124)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.PrepareStepHandler.execute(PrepareStepHandler.java:103)
> [Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:610) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:488) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:277) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:272) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:257) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:142) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.domain.http.server.DomainApiHandler.handleRequest(DomainApiHandler.java:154) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$2.run(SubjectDoAsHandler.java:96) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$2.run(SubjectDoAsHandler.java:92) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_17]
> [Host Controller] at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_17]
> [Host Controller] at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:92) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:86) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at io.undertow.server.handlers.BlockingHandler.handleRequest(BlockingHandler.java:50) [undertow-core-1.0.0.Beta12.jar:1.0.0.Beta12]
> [Host Controller] at org.jboss.as.domain.http.server.DomainApiCheckHandler.handleRequest(DomainApiCheckHandler.java:87) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Beta12.jar:1.0.0.Beta12]
> [Host Controller] at io.undertow.server.HttpHandlers.executeRootHandler(HttpHandlers.java:36) [undertow-core-1.0.0.Beta12.jar:1.0.0.Beta12]
> [Host Controller] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:614) [undertow-core-1.0.0.Beta12.jar:1.0.0.Beta12]
> [Host Controller] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
> [Host Controller] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
> [Host Controller] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
> [Host Controller]
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 5 months
[JBoss JIRA] (WFLY-1997) NPE executing domain operation
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-1997?page=com.atlassian.jira.plugin.... ]
Brian Stansberry reassigned WFLY-1997:
--------------------------------------
Assignee: Emanuel Muckenhuber (was: Brian Stansberry)
Emanuel, I'm assigning to you as the dependent issue is assigned to you.
> NPE executing domain operation
> ------------------------------
>
> Key: WFLY-1997
> URL: https://issues.jboss.org/browse/WFLY-1997
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Reporter: Heiko Braun
> Assignee: Emanuel Muckenhuber
> Fix For: 8.0.0.CR1
>
>
> {noformat}
> [ERROR] Request
> [ERROR] {
> [ERROR] "operation" => "composite",
> [ERROR] "address" => [],
> [ERROR] "steps" => [
> [ERROR] {
> [ERROR] "address" => [("server-group" => "*")],
> [ERROR] "operation" => "read-resource-description",
> [ERROR] "access-control" => "trim-descriptions",
> [ERROR] "operations" => true
> [ERROR] },
> [ERROR] {
> [ERROR] "address" => [
> [ERROR] ("host" => "master"),
> [ERROR] ("server" => "*")
> [ERROR] ],
> [ERROR] "operation" => "read-resource-description",
> [ERROR] "access-control" => "trim-descriptions",
> [ERROR] "operations" => true
> [ERROR] },
> [ERROR] {
> [ERROR] "address" => [("extension" => "*")],
> [ERROR] "operation" => "read-resource-description",
> [ERROR] "access-control" => "trim-descriptions",
> [ERROR] "operations" => true
> [ERROR] }
> [ERROR] ],
> [ERROR] "operation-headers" => {"roles" => "OPERATOR"}
> [ERROR] }
> {noformat}
> leads to
> {noformat}
> [Host Controller] 16:34:53,544 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-12) JBAS014612: Operation ("composite") failed - address: ([]): java.lang.NullPointerException
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.HostControllerExecutionSupport$Factory.create(HostControllerExecutionSupport.java:167)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.HostControllerExecutionSupport$Factory.create(HostControllerExecutionSupport.java:181)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationSlaveStepHandler.addSteps(OperationSlaveStepHandler.java:108)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationCoordinatorStepHandler.executeTwoPhaseOperation(OperationCoordinatorStepHandler.java:201)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationCoordinatorStepHandler.execute(OperationCoordinatorStepHandler.java:124)
> [Host Controller] at org.jboss.as.domain.controller.operations.coordination.PrepareStepHandler.execute(PrepareStepHandler.java:103)
> [Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:610) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:488) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:277) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:272) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:257) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:142) [wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.domain.http.server.DomainApiHandler.handleRequest(DomainApiHandler.java:154) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$2.run(SubjectDoAsHandler.java:96) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$2.run(SubjectDoAsHandler.java:92) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_17]
> [Host Controller] at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_17]
> [Host Controller] at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:92) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:86) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at io.undertow.server.handlers.BlockingHandler.handleRequest(BlockingHandler.java:50) [undertow-core-1.0.0.Beta12.jar:1.0.0.Beta12]
> [Host Controller] at org.jboss.as.domain.http.server.DomainApiCheckHandler.handleRequest(DomainApiCheckHandler.java:87) [wildfly-domain-http-interface-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
> [Host Controller] at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Beta12.jar:1.0.0.Beta12]
> [Host Controller] at io.undertow.server.HttpHandlers.executeRootHandler(HttpHandlers.java:36) [undertow-core-1.0.0.Beta12.jar:1.0.0.Beta12]
> [Host Controller] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:614) [undertow-core-1.0.0.Beta12.jar:1.0.0.Beta12]
> [Host Controller] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
> [Host Controller] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
> [Host Controller] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
> [Host Controller]
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 5 months
[JBoss JIRA] (WFLY-2148) Cache role mapping results for the span of the overall operation
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-2148?page=com.atlassian.jira.plugin.... ]
Brian Stansberry updated WFLY-2148:
-----------------------------------
Fix Version/s: 9.0.0.CR1
(was: 8.0.0.CR1)
> Cache role mapping results for the span of the overall operation
> ----------------------------------------------------------------
>
> Key: WFLY-2148
> URL: https://issues.jboss.org/browse/WFLY-2148
> Project: WildFly
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Reporter: Brian Stansberry
> Assignee: Darran Lofthouse
> Fix For: 9.0.0.CR1
>
>
> Look into caching role mapping results for the duration of an overall operation. This would be an impl detail of the RoleMapper. With our standard mappers, the mapping results should not be changing in the middle of an operation, so I believe they should be cacheable.
> Likely place to cache them is as an attachment in a context object that will be passed in to the Authorizer. It would have to be passed in to the RoleMapper as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 5 months
[JBoss JIRA] (WFLY-2150) Rethink OperationContextImpl.getBasicAuthorizationResponse
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-2150?page=com.atlassian.jira.plugin.... ]
Brian Stansberry updated WFLY-2150:
-----------------------------------
Fix Version/s: 9.0.0.CR1
(was: 8.0.0.CR1)
> Rethink OperationContextImpl.getBasicAuthorizationResponse
> ----------------------------------------------------------
>
> Key: WFLY-2150
> URL: https://issues.jboss.org/browse/WFLY-2150
> Project: WildFly
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Fix For: 9.0.0.CR1
>
>
> OperationContextImpl.getBasicAuthorizationResponse is designed around the "pass" case. It tests all action effects but discards data if any fail. This is ok in the normal case where things will pass. But in the read-resource-description and recursive read-resource cases, where things may often fail with the failure being recorded as expected (i.e. non-failure) output, this approach is inefficient, because the caller is forced to re-authorize to get the discarded data.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 5 months