Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
6.4.9.GA
-
None
Description
If no default stateful session is defined in the kjar, an exception is raised when the user clicks on "build & deploy" in the workbench:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Caused by: java.lang.IllegalStateException: Cannot find ksession, either it does not exist or there are multiple default ksession in kmodule.xml
at org.jbpm.services.cdi.impl.manager.InjectableRegisterableItemsFactory.getWorkItemHandlers(InjectableRegisterableItemsFactory.java:157) [jbpm-services-cdi-6.5.0.Final-redhat-23.jar:6.5.0.Final-redhat-23]
at org.jbpm.runtime.manager.impl.AbstractRuntimeManager.registerItems(AbstractRuntimeManager.java:123) [jbpm-runtime-manager-6.5.0.Final-redhat-23.jar:6.5.0.Final-redhat-23]
at org.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:104) [jbpm-runtime-manager-6.5.0.Final-redhat-23.jar:6.5.0.Final-redhat-23]
at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:64) [jbpm-runtime-manager-6.5.0.Final-redhat-23.jar:6.5.0.Final-redhat-23]
at org.jbpm.services.cdi.impl.manager.RuntimeManagerFactoryCDIImpl$Proxy$$$_WeldClientProxy.newSingletonRuntimeManager(RuntimeManagerFactoryCDIImpl$Proxy$$$_WeldClientProxy.java) [jbpm-services-cdi-6.5.0.Final-redhat-23.jar:6.5.0.Final-redhat-23]
at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:134) [jbpm-kie-services-6.5.0.Final-redhat-23.jar:6.5.0.Final-redhat-23]
... 49 more
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The problem is caused because jBPM is assuming that there will always be a default statefull session here:
A kjar can be defined only with stateless sessions though. For instance, a valid kmodule.xml could look like:
<kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/kie/6.0.0/kmodule">
<kbase name="ScoreBase" default="true">
<ksession name="ScoreSession" type="stateless" default="true"/>
</kbase>
</kmodule>
The kmodule.xml above triggers the problem.
Attachments
Issue Links
- clones
-
JBPM-5154 Workbench compilation fails if no default stateful session is defined
- Open