Bug 813547 - NullPointerException occurs when newInstance property is set to false for the KnowledgeAgentConfiguration [NEEDINFO]
NullPointerException occurs when newInstance property is set to false for the...
Status: MODIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion) (Show other bugs)
BRMS 5.2.0.GA
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Edson Tirelli
Tomas Schlosser
:
Depends On:
Blocks: 814415 812707
  Show dependency treegraph
 
Reported: 2012-04-17 16:18 EDT by Amana
Modified: 2013-08-28 01:31 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 814415 (view as bug list)
Environment:
Last Closed:
Type: Support Patch
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
kushalappa: needinfo?


Attachments (Terms of Use)
Test case (4.70 KB, text/x-java)
2012-04-18 11:03 EDT, Alessandro Lazarotti
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBRULES-3467 Major Closed NullPointerException occurs when newInstance property is set to false for the KnowledgeAgentConfiguration 2013-10-08 06:11:49 EDT

  None (edit)
Description Amana 2012-04-17 16:18:57 EDT
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.
Comment 1 Alessandro Lazarotti 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.
Comment 2 Alessandro Lazarotti 2012-04-19 17:15:27 EDT
Since incremental kbase is a very important feature to be present in CEP based applications and has a big impact in customer applications, GSS is setting this BZ as high priority
Comment 3 Edson Tirelli 2012-04-19 17:46:06 EDT
I started working on this this afternoon. I will keep the ticket updated.
Comment 4 Edson Tirelli 2012-04-21 18:27:18 EDT
This turned out to be a bit more complicated than I expected as the code was different in different versions and the problem was also different.

Fix committed to 5.2.x, 5.3.x, 5.4.x and master (5.5) branches.

[droolsjbpm-knowledge] etirelli pushed 1 new commit to 5.2.x: https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/88970dfb16d8669299d40bfad4dd464aa986e029
[droolsjbpm-knowledge/5.2.x] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
[droolsjbpm-knowledge] etirelli pushed 1 new commit to 5.4.x: https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/a04039e09f01f50e2386ec6081dc1d8fc6701d21
[droolsjbpm-knowledge/5.4.x] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
[droolsjbpm-knowledge] etirelli pushed 1 new commit to master: https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/d314415c76f991d605958d5f6c0fcaf27b9739bd
[droolsjbpm-knowledge/master] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
[droolsjbpm-knowledge] etirelli pushed 1 new commit to 5.3.x: https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/c0b97b15adb4acd38b3d13e3d49085ecd2e4a952
[droolsjbpm-knowledge/5.3.x] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
[drools] etirelli pushed 1 new commit to 5.2.x: https://github.com/droolsjbpm/drools/commit/cbd835c28ee84311c1222352b8e89cc32291ee54
[drools/5.2.x] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
[drools] etirelli pushed 1 new commit to 5.3.x: https://github.com/droolsjbpm/drools/commit/d29fabbb14fb40c971749fdacc87e9f0f105fc25
[drools/5.3.x] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
[drools] etirelli pushed 1 new commit to 5.4.x: https://github.com/droolsjbpm/drools/commit/8440adcfe456414b6bb4ce31a84352f8503e7053
[drools/5.4.x] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
[drools] etirelli pushed 1 new commit to master: https://github.com/droolsjbpm/drools/commit/7a0b4c1cd0a3ebbce8ef3ca63df825c840839d19
[drools/master] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
[drools] etirelli pushed 1 new commit to 5.2.x: https://github.com/droolsjbpm/drools/commit/c04e46a2d237964b42c20be1408255cd731b8b60
[drools/5.2.x] JBRULES-3467: BZ-813547: fixing agent incremental kbase building - Edson Tirelli
Comment 5 JBoss JIRA Server 2012-04-21 18:28:20 EDT
Edson Tirelli <ed.tirelli@gmail.com> updated the status of jira JBRULES-3467 to Closed
Comment 6 Ryan Zhang 2012-04-23 03:35:59 EDT
Update status to ON_QA. Please verify them against ER6.
Comment 7 Ryan Zhang 2012-04-23 03:49:16 EDT
sorry, confirmed that not in ER6 yet. Change back status
Comment 8 Edson Tirelli 2012-04-23 10:31:11 EDT
This was fixed last Saturday, Apr 21st. Not sure when ER6 was built.
Comment 11 Kushalappa 2013-08-28 01:31:53 EDT
Is there a work around for this in 5.2 drools final verions?

Note You need to log in before you can comment on or make changes to this bug.