Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-3125

[GSS](6.4.z) Workbench Compilation/Deployment fails if no default stateful session is defined

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 6.4.9.GA
    • Business Central
    • None
    • Hide

      Create a kjar project and edit the kmodule.xml like the example above. Click on "build & deploy".

      Show
      Create a kjar project and edit the kmodule.xml like the example above. Click on "build & deploy".

      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:

      https://github.com/droolsjbpm/jbpm/blob/master/jbpm-services/jbpm-services-cdi/src/main/java/org/jbpm/services/cdi/impl/manager/InjectableRegisterableItemsFactory.java#L157

      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.

              swiderski.maciej Maciej Swiderski (Inactive)
              vsoni16 Vishal Soni (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson
              Jan Hrcek Jan Hrcek (Inactive)
              Jan Hrcek Jan Hrcek (Inactive)

                Created:
                Updated:
                Resolved:
                Archived: