+++ This bug was initially created as a clone of Bug #813547 +++ When the "drools.agent.newInstance" property is set to false, the client application which uses the KnowledgeAgent to recognize changes/ updates performed in KnowledgeBase throws an exception. It is thrown after changing a temporal rule and building the package: Exception in thread "main" org.drools.RuntimeDroolsException: Unexpected exception executing action org.drools.rule.SlidingTimeWindow$BehaviorExpireWMAction@5e53bbfa at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1001) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:734) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:701) at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218) at com.sample.ExecutarAgente.main(ExecutarAgente.java:62) Caused by: java.lang.NullPointerException at org.drools.rule.SlidingTimeWindow.isExpired(SlidingTimeWindow.java:192) at org.drools.rule.SlidingTimeWindow.expireTuples(SlidingTimeWindow.java:161) *We are creating a test case to reproduce this bug. --- Additional comment from alazarot on 2012-04-18 11:03:17 EDT --- Created attachment 578380 [details] Test case I've added a test case for this issue. If necessary I can add it to drools test suite too. Please validate if it fits to going to code base.
GSS considers this an important addition to BRMS 5.3, as it is being fixed in 5.2 and we don't want a regression. Thanks, Rick
This was committed to all branches: 5.2, 5.3, 5.4 and master (5.5). https://bugzilla.redhat.com/show_bug.cgi?id=813547
The fixed for this issue should be included in ER7. Please do verification on it.
The fix is in and the tests do not fail. VERIFIED.
Customer is still facing the issue on BRMS 5.3.1. I will attach a new test case ASAP
Created attachment 606373 [details] Test case demonstrating the issue still after BRMS 5.3.0 release Attached a new test case demonstrating the issue still after BRMS 5.3.0 release
Edson, do you need a pull request about the attached test case or just it here is enough?
Alessandro, thank you, the attached case allowed me to see the remaining issue. The engine was not properly cleaning up scheduled event expiration for events that belonged to sliding windows, when the rule was removed or replaced/updated. This is fixed now, test case was updated. <jbossbot> git [drools] push 5.3.x f10b9d1.. Edson Tirelli JBRULES-3467: BZ-813547: BZ-814415: the engine was not cleaning up scheduled expirations for events in sliding windows when removing or replacing an existing rule. Fixed, test case updated. <jbossbot> jira [JBRULES-3467] NullPointerException occurs when newInstance property is set to false for the KnowledgeAgentConfiguration [Closed (Done) Bug, Major, Edson Tirelli] https://issues.jboss.org/browse/JBRULES-3467 <jbossbot> git [drools] push 5.3.x URL: http://github.com/droolsjbpm/drools/compare/fe70276...f10b9d1
Verified on 5.3.1.BRMS-ER1
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.