Unable to automatically create branches in "Managed Git Repository" for JBoss BRMS 6.2

Solution Verified - Updated -

Environment

  • Red Hat JBoss BRMS (BRMS) 6.2

Issue

  • By trying to create a Managed Git Repository in business central with Automatically Configure Branches set, the repository gets created. However, only the master branch is created, it is missing the dev and release branches.
  • It seems like the Automatically Configure Branches option when creating a Managed Git Branch is not working properly in BPMS 6.2. After setting this option, only the master branch gets created. Dev and Release branches are not created and there is a warning message in server.log:
10:44:46,286 WARN  [org.jbpm.executor.impl.AbstractAvailableJobsExecutor] (EJB default - 8) Error during command org.guvnor.asset.management.backend.command.CreateBranchCommand error message Unknown Command implementation with name 'org.guvnor.asset.management.backend.command.CreateBranchCommand': java.lang.IllegalArgumentException: Unknown Command implementation with name 'org.guvnor.asset.management.backend.command.CreateBranchCommand'
    at org.jbpm.executor.impl.ClassCacheManager.findCommand(ClassCacheManager.java:60) [jbpm-executor-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
...

Resolution

As the issue happens due to the business-central and kie-server using the same database, there are two options to fix it:

  1. if you do not use kie-server undeploy it;
  2. if you use kie-server, configure it with different database (via different data source). Please refers to How to configure BPMS 6 to use an external Database? to obtain further details regarding configuring an external database for business-central or kie-server.

Note: For testing purpose, you do not need to configure BRMS with external database - though it is certainly advised in production. You still could use the embedded H2 database but just use a different instance.

If kie-server.war is using jBPM extension then by default, it uses the same datasource as used by business-central.war: java:jboss/datasources/ExampleDS. So, as a quick test you can also configure kie-server.war with different H2 embedded database (i.e. put this in the standalone.xml):

<datasource jndi-name="java:jboss/datasources/KieServer" pool-name="KieServerDS" enabled="true" use-java-context="true">
                    <connection-url>jdbc:h2:mem:kieServer;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                    <driver>h2</driver>
                    <security>
                        <user-name>sa</user-name>
                        <password>sa</password>
                    </security>
                </datasource>

and then configure standalone.xml properties like this:

<property name="org.kie.server.persistence.ds" value="java:jboss/datasources/KieServer"/>

Root Cause

It fails due to the business-central and kie-server configured with the same database and thus kie-server might executor pick up jobs submitted by business-central. In general, kie-server and business-central should not share database due to this exact issue. Please refers to BZ-1305057 to obtain further details regarding this issue.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments