-
Bug
-
Resolution: Done
-
Minor
-
7.12.0.Final
If you configure event listeners in kmodule.xml,
<kmodule xmlns="http://www.drools.org/xsd/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <kbase name="defaultKieBase" default="true" eventProcessingMode="stream" equalsBehavior="identity"> <ksession name="defaultKieSession" type="stateful" default="true" clockType="realtime"> <fileLogger file="/tmp/AuditDebug.log" threaded="true" interval="1000" /> <listeners> <ruleRuntimeEventListener type="org.drools.core.event.DebugRuleRuntimeEventListener"/> <agendaEventListener type="org.drools.core.event.DebugAgendaEventListener"/> <processEventListener type="org.drools.core.event.DebugProcessEventListener"/> </listeners> </ksession> </kbase> </kmodule>
You get the following error on kjar deployment/start in kie-server. (Note: the kjar contains a rule flow bpmn2 file so JbpmKieServerExtension is triggered)
14:37:36,218 ERROR [stderr] (default task-8) java.lang.ClassCastException: java.lang.Class cannot be cast to org.kie.api.event.rule.RuleRuntimeEventListener 14:37:36,219 ERROR [stderr] (default task-8) at org.drools.compiler.kie.util.InjectionHelper.wireListeners(InjectionHelper.java:111) 14:37:36,219 ERROR [stderr] (default task-8) at org.drools.compiler.kie.util.InjectionHelper.wireSessionComponents(InjectionHelper.java:75) 14:37:36,219 ERROR [stderr] (default task-8) at org.drools.compiler.kie.util.InjectionHelper.wireSessionComponents(InjectionHelper.java:65) 14:37:36,219 ERROR [stderr] (default task-8) at org.jbpm.runtime.manager.impl.KModuleRegisterableItemsFactory.getWorkItemHandlers(KModuleRegisterableItemsFactory.java:91) 14:37:36,219 ERROR [stderr] (default task-8) at org.jbpm.runtime.manager.impl.AbstractRuntimeManager.registerItems(AbstractRuntimeManager.java:146) 14:37:36,219 ERROR [stderr] (default task-8) at org.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:116) 14:37:36,219 ERROR [stderr] (default task-8) at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:64) 14:37:36,219 ERROR [stderr] (default task-8) at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:136) 14:37:36,219 ERROR [stderr] (default task-8) at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:203) 14:37:36,219 ERROR [stderr] (default task-8) at org.kie.server.services.jbpm.JbpmKieServerExtension.createContainer(JbpmKieServerExtension.java:416) 14:37:36,220 ERROR [stderr] (default task-8) at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:248) 14:37:36,220 ERROR [stderr] (default task-8) at org.kie.server.remote.rest.common.resource.KieServerRestImpl.createContainer(KieServerRestImpl.java:138) ...
It falls back to 2nd try and event listeners are eventually registered.
The error is ignorable so debug log level would be suitable for this error stack.
- is incorporated by
-
RHPAM-1626 java.lang.ClassCastException: java.lang.Class cannot be cast to org.kie.api.event.rule.RuleRuntimeEventListener
- Closed