[
https://jira.jboss.org/jira/browse/JBRULES-2299?page=com.atlassian.jira.p...
]
Mark Proctor closed JBRULES-2299.
---------------------------------
Resolution: Cannot Reproduce Bug
Assignee: Mark Proctor (was: Edson Tirelli)
I think this was fixed else where, as the test passes. I've added the unit test to
CepEspTest anyway.
Retracting events using PseudoClockScheduler causes
ClassCastException
----------------------------------------------------------------------
Key: JBRULES-2299
URL:
https://jira.jboss.org/jira/browse/JBRULES-2299
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core, drools-core (fusion)
Affects Versions: 5.1.0.M1
Reporter: Maciej Prochniak
Assignee: Mark Proctor
Fix For: 5.1.0.M2
Attachments: JBRULES-2299.patch, PseudoSchedulerRemoveJobTest.java
When job is scheduled e.g. in sth like not A(this after [1s,10s] $a)
and relevant event is retracted from working memory, the job should be removed.
However, PseudoClockScheduler usues queue containing wrappers for job (ScheduledJob),
and remove method tries to remove job without this wrapper which causes:
java.lang.ClassCastException: org.drools.common.Scheduler$DuractionJob incompatible with
org.drools.time.impl.PseudoClockScheduler$ScheduledJob
at
org.drools.time.impl.PseudoClockScheduler$ScheduledJob.compareTo(PseudoClockScheduler.java:188)
at java.util.PriorityQueue.remove(PriorityQueue.java:355)
at org.drools.time.impl.PseudoClockScheduler.removeJob(PseudoClockScheduler.java:121)
at org.drools.common.Scheduler.removeAgendaItem(Scheduler.java:62)
at org.drools.common.DefaultAgenda.removeScheduleItem(DefaultAgenda.java:451)
at org.drools.common.ScheduledAgendaItem.remove(ScheduledAgendaItem.java:198)
at org.drools.reteoo.RuleTerminalNode.retractLeftTuple(RuleTerminalNode.java:289)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:131)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:42)
at org.drools.reteoo.NotNode.retractLeftTuple(NotNode.java:276)
at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:234)
at org.drools.reteoo.EntryPointNode.retractObject(EntryPointNode.java:195)
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1207)
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1161)
at
org.drools.impl.StatefulKnowledgeSessionImpl.retract(StatefulKnowledgeSessionImpl.java:237)
at
pl.touk.droolsTest.PseudoSchedulerRemoveJobTest.testRule(PseudoSchedulerRemoveJobTest.java:61)
...more
Solution would be probably to wrap job which should be removed
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira