[
https://issues.jboss.org/browse/JBRULES-3378?page=com.atlassian.jira.plug...
]
RH Bugzilla Integration commented on JBRULES-3378:
--------------------------------------------------
rsynek(a)redhat.com changed the Status of [bug
761427|https://bugzilla.redhat.com/show_bug.cgi?id=761427] from ON_QA to ASSIGNED
ClassCastException when retrieving AgendaEventListener collection
-----------------------------------------------------------------
Key: JBRULES-3378
URL:
https://issues.jboss.org/browse/JBRULES-3378
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: Mario Fusco
Assignee: Mario Fusco
Fix For: 5.3.2.Final, 5.4.0.CR1
Following part of Spring configuration:
<bean id="debug-agenda-listener"
class="org.drools.event.DebugAgendaEventListener" />
<drools:ksession id="statefulSession" type="stateful"
kbase="kbase1">
<drools:agendaEventListener ref="debug-agenda-listener"/>
</drools:ksession>
when trying to find out AgendaEventListener count registered in knowledge
stateful session, got this exception:
org.springframework.web.util.NestedServletException: Request processing failed;
nested exception is java.lang.ClassCastException:
org.jbpm.process.instance.ProcessRuntimeImpl$3 cannot be cast to
org.drools.event.rule.AgendaEventListener
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause
java.lang.ClassCastException: org.jbpm.process.instance.ProcessRuntimeImpl$3
cannot be cast to org.drools.event.rule.AgendaEventListener
org.drools.impl.StatefulKnowledgeSessionImpl.getAgendaEventListeners(StatefulKnowledgeSessionImpl.java:182)
com.redhat.droolsspring.controllers.DroolsIntegrationStatefulTest.testAgendaListener(DroolsIntegrationStatefulTest.java:28)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:174)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:421)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:409)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
See attachment 542456 [details]:
build as maven project, then deploy to tomcat, open webapp in browser and click
on the first link.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira