Bug 814415 - NullPointerException occurs when newInstance property is set to false for the KnowledgeAgentConfiguration
Summary: NullPointerException occurs when newInstance property is set to false for the...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER7
: BRMS 5.3.0.GA
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 813547
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-19 20:13 UTC by Alessandro Lazarotti
Modified: 2025-02-10 03:19 UTC (History)
2 users (show)

Fixed In Version:
Clone Of: 813547
Environment:
Last Closed: 2025-02-10 03:19:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test case demonstrating the issue still after BRMS 5.3.0 release (4.84 KB, text/x-java)
2012-08-22 20:13 UTC, Alessandro Lazarotti
no flags Details

Description Alessandro Lazarotti 2012-04-19 20:13:23 UTC
+++ 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.

Comment 1 Rick Wagner 2012-04-19 20:19:13 UTC
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

Comment 2 Edson Tirelli 2012-04-25 15:26:38 UTC
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

Comment 3 Ryan Zhang 2012-05-14 08:17:21 UTC
The fixed for this issue should be included in ER7. Please do verification on it.

Comment 5 Lukáš Petrovický 2012-05-22 08:45:38 UTC
The fix is in and the tests do not fail. VERIFIED.

Comment 6 Alessandro Lazarotti 2012-08-21 12:55:18 UTC
Customer is still facing the issue on BRMS 5.3.1.
I will attach a new test case ASAP

Comment 7 Alessandro Lazarotti 2012-08-22 20:13:05 UTC
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

Comment 8 Alessandro Lazarotti 2012-08-22 20:35:11 UTC
Edson, do you need a pull request about the attached test case or just it here is enough?

Comment 9 Edson Tirelli 2012-08-27 17:10:49 UTC
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

Comment 12 Radovan Synek 2012-09-14 15:00:35 UTC
Verified on 5.3.1.BRMS-ER1

Comment 20 Red Hat Bugzilla 2025-02-10 03:19:40 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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