Bug 761427
| Summary: | ClassCastException when retrieving AgendaEventListener collection | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Radovan Synek <rsynek> |
| Component: | BRE (Expert, Fusion), jBPM 5 | Assignee: | Mario Fusco <mfusco> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | BRMS 5.3.0.GA | CC: | mproctor |
| Target Milestone: | --- | Keywords: | TestBlocker |
| Target Release: | future | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
When attempting to retrieve the AgendaEventerLister count registered in a stateful knowledge sessions a 'Requesting Process failed' exception is thrown.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-02-10 03:14:30 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
*** Bug 781288 has been marked as a duplicate of this bug. *** As mentioned in bug 781288, this bug clearly doesn't affect just Spring. It is a deeper issue. I've assigned this to mario. While the issue is in jBPM code, it's related to rules, and will be good for him to see how the projects interact with each other. I cherry-picked https://issues.jboss.org/browse/JBRULES-3380 to 5.3.x which should make this bug easier to fix. reproducer added to pull request: https://github.com/droolsjbpm/droolsjbpm-integration/pull/12 Mario Fusco <mario.fusco> updated the status of jira JBRULES-3378 to Resolved Please verify this issue on ER5. Mark Proctor <mark.proctor> updated the status of jira JBRULES-3380 to Resolved Mark Proctor <mark.proctor> updated the status of jira JBRULES-3380 to Closed This issue still persists on ER6. Actually I have found a reproducer in the project code: https://github.com/droolsjbpm/droolsjbpm-integration/blob/5.3.x/drools-container/drools-spring/src/test/java/org/drools/container/spring/SpringDroolsListenersTest.java Please uncomment the @Test annotation over testStatefulAgendaEventListener() method and run the test case, it gives me the same CCE. This issue has been fixed in jBPM 5.3 with the following commit: https://github.com/droolsjbpm/jbpm/commit/e1117535baa03f2a0645b87dd55030bb0
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
When attempting to retrieve the AgendaEventerLister count registered in a stateful knowledge sessions a 'Requesting Process failed' exception is thrown.
This product has been discontinued or is no longer tracked in Red Hat Bugzilla. |
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.