[jboss-jira] [JBoss JIRA] Commented: (JBRULES-3079) java.lang.ClassCastException: statefulKnowledgeSession.getAgendaEventListeners().size() and statefulKnowledgeSession.getWorkingMemoryEventListeners().size()
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Thu Jun 23 01:30:23 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-3079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610576#comment-12610576 ]
Mark Proctor commented on JBRULES-3079:
---------------------------------------
Vinod: It's always better to log it with a self contained unit test, as we can't just fix something, without a unit test. And if we have to write the tests ourselves it takes us a lot longer to get round to doing it, as we'll find easier things to do :)
> java.lang.ClassCastException: statefulKnowledgeSession.getAgendaEventListeners().size() and statefulKnowledgeSession.getWorkingMemoryEventListeners().size()
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBRULES-3079
> URL: https://issues.jboss.org/browse/JBRULES-3079
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core (expert)
> Affects Versions: 5.2.0.CR1
> Reporter: Vinod Kiran Paidimarry
> Assignee: Mark Proctor
>
> StatefulKnowledgeSession kstateful = ...
> kstateful.addEventListener(new SampleAgendaListener());
> System.out.println(kstateful.getAgendaEventListeners().size());
> java.lang.ClassCastException: org.drools.impl.StatefulKnowledgeSessionImpl$AgendaEventListenerWrapper cannot be cast to org.drools.event.rule.AgendaEventListener
> at org.drools.impl.StatefulKnowledgeSessionImpl.getAgendaEventListeners(StatefulKnowledgeSessionImpl.java:178)
>
> ---- second stack trace ------------------
> java.lang.ClassCastException: org.drools.impl.StatefulKnowledgeSessionImpl$WorkingMemoryEventListenerWrapper cannot be cast to org.drools.event.rule.WorkingMemoryEventListener
> at org.drools.impl.StatefulKnowledgeSessionImpl.getWorkingMemoryEventListeners(StatefulKnowledgeSessionImpl.java:161)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list