wtorek, 20 października 2015

Installing KIE Server and Workbench on same server

A common requirement for installation on development machine is to run both KIE Workbench and KIE Server on same server to simplify execution environment and avoid any port offset configuration.

This article will explain all installation steps needed to make this happen on two most frequently used containers:

  • Wildfly 8.2.0.Final
  • Apache Tomcat 8

Download binaries

So let's get our hands dirty and play around with some installation steps. First make sure you download correct versions of workbench and KIE Server for the container you target.




Deploy applications

Copy downloaded files into WILDFLY_HOME/standalone/deployments, while copying rename them to simplify the context paths that will be used on application server:
  • rename kie-wb-distribution-wars-6.3.0.Final-wildfly8.war to kie-wb.war
  • rename kie-server-6.3.0.Final-ee7.war to kie-server.war

Configure your server

With Wildfly there is not much to setup as both transaction manager and persistence (including data source) is already preconfigured.

Configure users

  • create user in application realm 
    • name: kieserver 
    • password: kieserver1!
    • roles: kie-server
  • create user in application realm to logon to workbench
    • name: workbench 
    • password: workbench!
    • roles: admin, kie-server

Configure system properties

Following list of properties needs to be given to work smoothly for both workbench and KIE Server:
  • -Dorg.kie.server.id=wildfly-kieserver 
  • -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server 
  • -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller

Launching the server

best way is to add system properties into startup command when launching Wildfly server. Go to WILDFLY_HOME/bin and issue following command:

./standalone.sh --server-config=standalone-full.xml -Dorg.kie.server.id=wildfly-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller


Deploy applications

Copy downloaded files into TOMCAT_HOME/webapps, while copying rename them to simplify the context paths that will be used on application server:
  • rename kie-wb-distribution-wars-6.3.0.Final-tomcat7.war to kie-wb.war
  • rename kie-server-6.3.0.Final-webc.war to kie-server.war

Configure your server

  1. Copy following libraries into TOMCAT_HOME/lib
    1. btm-2.1.4
    2. btm-tomcat55-lifecycle-2.1.4
    3. h2-1.3.161
    4. jacc-1.0
    5. jta-1.1
    6. kie-tomcat-integration-6.3.0.Final
    7. slf4j-api-1.7.2
    8. slf4j-api-1.7.2
  2. Create Bitronix configuration files to enable JTA transaction manager
  • Create file 'btm-config.properties' under TOMCAT_HOME/conf with following content
  • Create file 'resources.properties' under TOMCAT_HOME/conf with following content

Configure users

Create following users in tomcat-users.xml under TOMCAT_HOME/conf
  • create user
    • name: kieserver 
    • password: kieserver1!
    • roles: kie-server
  • create user to logon to workbench
    • name: workbench 
    • password: workbench!
    • roles: admin, kid-server
  <role rolename="admin"/>
  <role rolename="analyst"/> 
  <role rolename="user"/>
  <role rolename="kie-server"/>

  <user username="workbench" password="workbench1!" roles="admin,kie-server"/>
  <user username="kieserver" password="kieserver1!" roles="kie-server"/>  

Configure system properties

Configure following system properties in file setenv.sh under TOMCAT_HOME/bin

NOTE: Simple copy this into setenv.sh files to properly setup KIE Server and Workbench on Tomcat:
CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=$CATALINA_HOME -Dorg.jbpm.cdi.bm=java:comp/env/BeanManager -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Djava.security.auth.login.config=$CATALINA_HOME/webapps/kie-wb/WEB-INF/classes/login.config -Dorg.kie.server.persistence.ds=java:comp/env/jdbc/jbpm -Dorg.kie.server.persistence.tm=org.hibernate.service.jta.platform.internal.BitronixJtaPlatform -Dorg.kie.server.id=tomcat-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller"

Launching the server

Go to TOMCAT_HOME/bin and issue following command:

Going beyond default setup

Disabling KIE Server extensions

And that's all to do to setup both KIE Server and Workbench on single server instance (either Wildfly or Tomcat). This article focused on fully featured KIE server installation meaning both BRM (rules) and BPM (processes, tasks) capabilities. Although KIE Server can be configured to serve only subset of the capabilities - e.g. only BRM or only BPM.

To do so one can configure KIE Server with system properties to disable extensions (BRM or BPM)

add following system property to startup command:
  • disable BRM: -Dorg.drools.server.ext.disabled=true
  • disable BPM: -Dorg.jbpm.server.ext.disabled=true
So the startup command would look like this:
./standalone.sh --server-config=standalone-full.xml -Dorg.kie.server.id=wildfly-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller -Dorg.jbpm.server.ext.disabled=true

add following system property to setenv.sh script (must be still part of CATALINA_OPTS configuration):
  • disable BRM: -Dorg.drools.server.ext.disabled=true
  • disable BPM: -Dorg.jbpm.server.ext.disabled=true
Complete content of setenv.sh is as follows:
CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=$CATALINA_HOME -Dorg.jbpm.cdi.bm=java:comp/env/BeanManager -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Djava.security.auth.login.config=$CATALINA_HOME/webapps/kie-wb/WEB-INF/classes/login.config -Dorg.kie.server.persistence.ds=java:comp/env/jdbc/jbpm -Dorg.kie.server.persistence.tm=org.hibernate.service.jta.platform.internal.BitronixJtaPlatform -Dorg.kie.server.id=tomcat-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller -Dorg.jbpm.server.ext.disabled=true"

Changing data base and persistence settings

Since by default persistence uses just in memory data base (H2) it is good enough for first tryouts or demos but not for real usage. So to be able to change persistence settings following needs to be done:

KIE Workbench on Wildfly
Modify data source configuration in Wildfly - either via manual editing of standalone-full.xml file or using tools such as Wildfly CLI. See Wildfly documentation on how to define data sources.

  • Next modify persistence.xml that resides inside workbench war file. Extract the kie-wb.war file into directory with same name and in same location (WILDFLY_HOME/standalone/deployments). 
  • Then navigate to kie-wb.war/WEB-INF/classes/META-INF
  • Edit persistence.xml file and change following elements
    • jta-data-source to point to the newly created data source (JNDI name) for your data base
    • hibernate.dialect to hibernate supported dialect name for you data base
KIE Server on Wildfly
there is no need to do any changes to the application (the war file) as the persistence can be reconfigured via system properties. Set following system properties at the end of server startup command

  • -Dorg.kie.server.persistence.ds=java:jboss/datasources/jbpmDS
  • -Dorg.kie.server.persistence.dialect=org.hibernate.dialect.MySQL5Dialect
Full command to start server will be:
./standalone.sh --server-config=standalone-full.xml -Dorg.kie.server.id=wildfly-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller -Dorg.kie.server.persistence.ds=java:jboss/datasources/jbpmDS 

KIE Workbench on Tomcat
To modify data source configuration in Tomcat you need to alter resources.properties (inside TOMCAT_HOME/conf) file that defines data base connection. For MySQL it could look like this:


Make sure you're copy mysql JDBC driver into TOMCAT_HOME/lib otherwise it won't provide proper connection handling.
  • Next modify persistence.xml that resides inside workbench war file. Extract the kie-wb.war file into directory with same name and in same location (TOMCAT_HOME/webapps). 
  • Then navigate to kie-wb.war/WEB-INF/classes/META-INF
  • Edit persistence.xml file and change following elements
    • jta-data-source to point to the newly created data source (JNDI name) for your data base
    • hibernate.dialect to hibernate supported dialect name for you data base
KIE Server on Tomcat
there is no need to do any changes to the application (the war file) as the persistence can be reconfigured via system properties. Set or modify (as data source is already defined there) following system properties in setenv.sh script inside TOMCAT_HOME/bin

  • -Dorg.kie.server.persistence.ds=java:comp/env/jdbc//jbpmDS
  • -Dorg.kie.server.persistence.dialect=org.hibernate.dialect.MySQL5Dialect
Complete content of the setenv.sh script is as follows:
CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=$CATALINA_HOME -Dorg.jbpm.cdi.bm=java:comp/env/BeanManager -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Djava.security.auth.login.config=$CATALINA_HOME/webapps/kie-wb/WEB-INF/classes/login.config -Dorg.kie.server.persistence.ds=java:comp/env/jdbc/jbpmDS -Dorg.kie.server.persistence.tm=org.hibernate.service.jta.platform.internal.BitronixJtaPlatform 
-Dorg.kie.server.id=tomcat-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller"

Note that KIE Server persistence is required only for BPM capability so if you disable it you can skip any KIE server related persistence changes.

And that would be it. Hopefully this article will help with installation of KIE Workbench and Server on single application server. 

Have fun and comments more than welcome.

56 komentarzy:

  1. Hi there, do have have an example for Websphere 8.5 ? I'm struggling to get it working on WAS.
    The instruction from here:
    doesn't work, when using kie-drools-wb-6_3_0_Final-was8_war.


    1. what sort of issues do you have? The instruction in github should be up to date as it was recently verified. So if you could provide more details about the issue we could try to figure out what's causing troubles.

  2. Sure .. these configuration steps don't exist with the was8.war file:

    "From here, you will be asked with several deployments settings.
    - You'll need to select the datasource created above as the datasource to be used by the application.
    - Screen Bind listeners for message-driven beans - select for every bean Activation Specification and fill the corresponding activation specification JNDI name into Target Resource JNDI Name (e.g. jms/activation/KIE.SESSION). You may also specify Destination JNDI name using JNDI name of the appropriate JMS queue (e.g. jms/queue/KIE.SESSION)"

    When deploying the war from the WAS Console even with the 'Detailed deployment path' only those config steps are available:
    1. Select installation options
    2. Map modules to servers
    3. Provide JSP reloading options for Web modules
    4. Map shared libraries
    5. Map shared library relationships
    6. Initialize parameters for servlets
    7. Provide JNDI names for beans
    8. Bind EJB Business
    9. Map virtual hosts for Web modules
    10. Map context roots for Web modules
    11. Map security roles to users or groups
    12. Map JASPI provider
    13. Metadata for modules
    14. Display module build Ids
    15. Summary

    Step 7. has the following beans:
    - AvailableJobsExecutor
    - SimpleAsyncExecutorService
    - AlternativeStarterBean
    - DeploymentSynchronizerCDInvoker
    - MailboxProcessOutgoingExecutorManager
    - ConfigServiceWatchServiceExecutorImpl
    - EJBTimerScheduler
    - IOWatchServiceExecutorImpl
    - IncrementalBuilderExecutorManager

    As you can see this doesn't quite fit the installation description.

    1. Hi Maciej,

      Any luck with this ? Is there any official place I can log a ticket ?

    2. Have you seen this installation notes:http://mswiderski.blogspot.com/2014/04/jbpm-6-on-websphere-installation-notes.html

      if that still does not help please start a new email thread on the mailing list: jbpm-setup@googlegroups.com will be way easier to go over the issue then on blog comments.

  3. Hi there,
    It worked well. But I fail to understand what exactly the kie-server vs kie-wb.
    Does kie-wb has development tools and kie-server only the runtime? Does kie-wb includes a kie-server?

    Thank you

    1. correct, kie server is just runtime execution server while workbench has authoring, management and reporting.

  4. kie-wb working fine, but i am getting Forbidden error while access the server..http://localhost:8080/kie-server/

    1. double check your settings for kie server user on both ends.

  5. my tomcat is not starting... tomcat hangs after "Starting Bitronix Transaction Manager"

    INFO: Starting service Catalina
    Jan 6, 2016 4:23:45 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.25
    Jan 6, 2016 4:23:45 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive /app_local/whp-tomcat-7/webapps/kie-server.war
    Jan 6, 2016 4:23:46 PM bitronix.tm.integration.tomcat55.BTMLifecycleListener lifecycleEvent
    INFO: Starting Bitronix Transaction Manager

  6. I am not able to see 'Tools' menu in the workbench.
    Though rest of the menu items are visible viz., Explore, New Item and Repository.

    Please help. Thanks

  7. does this instructions work in wildfly 9 ??

  8. i deployed both wars to wildfly 9, but when i try to access this endpoint
    the server gives me the error

    16:58:39,065 WARN [org.jboss.resteasy.core.ExceptionHandler] (default task-56) failed to execute: javax.ws.rs.NotFoundException: Could not find resource for full path:
    at org.jboss.resteasy.core.registry.SegmentNode.match(SegmentNode.java:112)
    at org.jboss.resteasy.core.registry.RootNode.match(RootNode.java:43)
    at org.jboss.resteasy.core.registry.RootClassNode.match(RootClassNode.java:48)
    at ........................

    also, my session in the workbench logs out

    what am i missing ?

    1. I don't think there is such endpoint as the exception suggests. Make sure you access valid and existing endpoint of the rest api

  9. i have also tried to access the rest api in wildfly 8 but accessing this url

    gives me this exception

    17:22:27,064 WARN [org.jboss.resteasy.core.ExceptionHandler] (default task-45) failed to execute: javax.ws.rs.ForbiddenException: HTTP 403 Forbidden
    at org.jboss.resteasy.plugins.interceptors.RoleBasedSecurityFilter.filter(RoleBasedSecurityFilter.java:45) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:264) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.10.Final.jar:]

    even if i am logged in as workbench user

    i have also noticed that there are many of this entries while the server is starting

    2016-01-26 17:18:36,504 WARN [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (MSC service thread 1-1) Exception encountered while syncing with controller at error Error while sending PUT request to response code 405

    1. make sure that your user has a rest-all role assigned otherwise you won't be able to use REST api of workbench.

      These warning in server.log are valid as kie server starts faster that workbench and thus cannot connect to it unless workbench is fully started

    2. I added rest-all roles tot he user, But I am getting the same error.
      14:43:54,470 WARN [org.kie.server.services.impl.controller.DefaultRestControlle
      rImpl] (KieServer-ControllerConnect) Exception encountered while syncing with co
      ntroller at http://:8080/kie-wb/rest/controller/server/wildfly-kie
      server error Connection refused: connect

  10. -- localhost.2016-02-12.log --
    SEVERE [http-nio-8080-exec-5] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [Resteasy] in context with path [/kie-wb] threw exception
    at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:59)
    at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:357)
    at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)
    at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)
    at org.uberfire.backend.server.security.adapter.GroupAdapterAuthorizationSource.collectGroups(GroupAdapterAuthorizationSource.java:22)
    at org.uberfire.ext.security.server.ServletSecurityAuthenticationService.getUser(ServletSecurityAuthenticationService.java:114)
    at org.uberfire.ext.security.server.ServletSecurityAuthenticationService.login(ServletSecurityAuthenticationService.java:66)
    at org.uberfire.ext.security.server.ServletSecurityAuthenticationService$Proxy$_$$_WeldClientProxy.login(ServletSecurityAuthenticationService$Proxy$_$$_WeldClientProxy.java)
    at org.uberfire.ext.security.server.BasicAuthSecurityFilter.authenticate(BasicAuthSecurityFilter.java:91)
    at org.uberfire.ext.security.server.BasicAuthSecurityFilter.doFilter(BasicAuthSecurityFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:45)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

  11. -- localhost_access_log.2016-02-12.txt -- - kieserver [12/Feb/2016:11:52:25 -0700] "PUT /kie-wb/rest/controller/server/tomcat-kieserver HTTP/1.1" 500 - - kieserver [12/Feb/2016:11:52:34 -0700] "PUT /kie-wb/rest/controller/server/tomcat-kieserver HTTP/1.1" 201 3

  12. Maciej, firstly thanks for all the posts I've seen regarding Drools. I know it takes time to create them and they are appreciated.

    I am still having issues runing KIE server and KIE workbench on the same server. I have followed your instructions above.

    I've tried a similar setup on a Centos 7 server and the same thing happens. I've been trying for days to make this work, but no luck.

    Here's my setup:

    Operating System: Windows 7 64-bit
    Java: 1.8.0_66
    Java Container: Wildfly 8.1.0 Final

    Contents of application-roles.properties:


    Contents of users.properties:


    JBoss Initial Startup Log:

    2016-03-21 11:53:12,583 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
    2016-03-21 11:53:12,588 DEBUG [org.jboss.as.config] (MSC service thread 1-6) Configured system properties:
    java.class.path = C:\jbpm-installer\wildfly-8.1.0.Final\jboss-modules.jar
    java.class.version = 52.0
    java.endorsed.dirs = C:\Progra~1\Java\jdk1.8.0_66\jre\lib\endorsed
    java.home = C:\Progra~1\Java\jdk1.8.0_66\jre
    java.io.tmpdir = C:\Users\mp4783\AppData\Local\Temp\
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.8.0_66-b18
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Oracle Corporation
    java.version = 1.8.0_66
    java.vm.info = mixed mode
    jboss.bind.address = localhost
    jboss.home.dir = C:\jbpm-installer\wildfly-8.1.0.Final
    jboss.host.name = ohcdtd02mp4783
    jboss.modules.dir = C:\jbpm-installer\wildfly-8.1.0.Final\modules
    jboss.server.base.dir = C:\jbpm-installer\wildfly-8.1.0.Final\standalone
    jboss.server.config.dir = C:\jbpm-installer\wildfly-8.1.0.Final\standalone\configuration
    jboss.server.data.dir = C:\jbpm-installer\wildfly-8.1.0.Final\standalone\data
    jboss.server.deploy.dir = C:\jbpm-installer\wildfly-8.1.0.Final\standalone\data\content
    jboss.server.log.dir = C:\jbpm-installer\wildfly-8.1.0.Final\standalone\log
    jboss.server.name = ohcdtd02mp4783
    jboss.server.persist.config = true
    jboss.server.temp.dir = C:\jbpm-installer\wildfly-8.1.0.Final\standalone\tmp
    line.separator =

    org.kie.demo = false
    org.kie.example = false
    org.kie.server.controller = http://localhost:8080/kie-wb/rest/controller
    org.kie.server.controller.pwd = kieserver1!
    org.kie.server.controller.user = kieserver
    org.kie.server.id = first-kie-server
    org.kie.server.location = http://localhost:8080/kie-server/services/rest/server
    org.kie.server.pwd = kieserver1!
    org.kie.server.user = kieserver
    org.xml.sax.driver = __redirected.__XMLReaderFactory
    os.arch = amd64
    os.name = Windows 7
    os.version = 6.1
    sun.boot.class.path = C:\Progra~1\Java\jdk1.8.0_66\jre\lib\resources.jar;C:\Progra~1\Java\jdk1.8.0_66\jre\lib\rt.jar;C:\Progra~1\Java\jdk1.8.0_66\jre\lib\sunrsasign.jar;C:\Progra~1\Java\jdk1.8.0_66\jre\lib\jsse.jar;C:\Progra~1\Java\jdk1.8.0_66\jre\lib\jce.jar;C:\Progra~1\Java\jdk1.8.0_66\jre\lib\charsets.jar;C:\Progra~1\Java\jdk1.8.0_66\jre\lib\jfr.jar;C:\Progra~1\Java\jdk1.8.0_66\jre\classes
    sun.java.command = C:\jbpm-installer\wildfly-8.1.0.Final\jboss-modules.jar -mp C:\jbpm-installer\wildfly-8.1.0.Final\modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=C:\jbpm-installer\wildfly-8.1.0.Final -b localhost --server-config=standalone-full.xml -Dorg.kie.demo=false -Dorg.kie.example=false -Dorg.kie.server.id=first-kie-server -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller -Dorg.kie.server.user=kieserver -Dorg.kie.server.pwd=kieserver1! -Dorg.kie.server.controller.user=kieserver -Dorg.kie.server.controller.pwd=kieserver1!

    1. you have a type in the role name - it should be kie-server with dash in between kie and server:

  13. Forgive me, but I do not understand.

    Is the key value supposed to be "kieserver" (kieserver=...) or "kie-server" (kie-server=...)?

    Which of the following commands would be the correct one?

    add-user -a -u kieserver -p kieserver1! -ro admin,kieserver,rest-all

    add-user -a -u kieserver -p kieserver1! -ro admin,kie-server,rest-all

    If it's not too much trouble, perhaps you could show me what the entry is supposed to look like in each of the files that control this authentication.

    I have tried multiple combinations of kieserver and kie-server and none of them work. I seem to remember some time ago when I looked at Drools that I had to use Tomcat instead of JBoss to make it work, though that was at least 18 months ago.

    I also added the kieserver user to the management realm to confirm that I had the password correct and that WildFly could authenticate it. There were no issues.

    Is there a higher debugging level I might use here?

    Thanks again for your generosity.

  14. Sorry for all the messages. I just went to my Centos 7 box, downloaded WildFly 8.2.0.Final and the other two components, and followed the instructions above.

    The kie-wb component failed, but I think that was due to issues with the server being behind a proxy.

    Anyway, it appeared to work. I think the issue may be the WildFly version, though it is possible that I made some other error now that I look at it. The kie.server.id may have gotten mixed up.

    I'll let you know if I have issues in Windows.

  15. I can confirm that it works on my Windows 7 workstation also. I must have gotten something in the configuration wrong on I needed to use WildFly 8.2.0 as you detail above.

    I'm sorry to have troubled you with this.

  16. If I may impose upon you again, is there a way to configure a KIE execution server so that it can be accessed from another system? All of the examples configure it on localhost, but I wanted to have a Workbench instance on one server and one (or more) KIE execution servers on another server.

    I can't find anything in the documentation that directly addresses this.

    As always, thank you for your generous help.

  17. Me again... I actually think I figured it out. I "exposed" the kie-server and controller on "workbench" host and the remote "kie server" host by replacing "localhost" in the org.kie.server.location and org.kie.server.controller system properties with the fully qualified domain name of the appropriate hosts.


    KIE Execution Server:


    KIE Workbench Server:


    After both environments are started, this results in multiple KIE execution servers being displayed under the Deploy->Server Management Browser page. I assume then that I would be able to deploy to the remote server at some point. I'm just getting started with Drools, so I haven't gotten that far.

    Thanks for listening.

    1. correct, you control them via these properties. Since you change endpoint location but kept the same server id they will be seen as two - one on localhost used previously and the new one. In 6.4 there was much nicer UI for execution servers and this issue is already addressed.

  18. Hi ... i am getting a problem with the kie-wb. I have followed the instructions and trying to get the kie-wb working tomcat... i could see the the war is getting unpacked. I get some error while tomcat starts..

    java.lang.RuntimeException: Unable to create EntityManagerFactory due to [PersistenceUnit: org.jbpm.domain] Unable to build EntityManagerFactory

    Caused by: org.hibernate.service.jndi.JndiException: Unable to lookup JNDI name [java:jboss/datasources/ExampleDS]

    I try hitting http://localhost:8080/kie-wb/rest/controller and i always get 404. Any help would be much appreciated!


  19. Hi

    I have problem with localization of kie-wb.

    For example i build source of kie-wb-common-6.3.0.Final and change the CommonConstants.properties
    file in kie-wb-common-6.3.0.Final\kie-wb-common-widgets\kie-wb-common-ui\target\classes\org\kie\workbench\common\widgets\client\resources\i18n.
    I copy CommonConstants.properties in
    \webapps\kie-wb\WEB-INF\classes\org\kie\workbench\client\resources\i18n .
    but nothing happen and the jar file in source is not in the kie-wb war file
    Please help me
    Thanx so much

  20. Hi,
    Not able to connect with MySQL DB. getting error

    SEVERE [localhost-startStop-1] org.kie.workbench.drools.backend.server.AppSetup.assertPlayground Error during update config
    javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.domain] Unable to build EntityManagerFactory
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:925)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.hibernate.service.jndi.JndiException: Unable to lookup JNDI name [java:comp/env/jdbc/jbpmDS]
    at org.hibernate.service.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:68)

    Please help me.
    Thanks in advance

  21. there is a lot to learn from you regarding my jboss training.

  22. Hi I downloaded wildfly-8.1, and the war file this blog. I am running using jdk 1.7.
    I am getting the following 405 error.
    I added user with role : admin, kie-server,rest-all
    localhost:8080 shows wildfy8 is running, but http://localhost:8080/kie-wb gives 404 error
    Thank you.
    14:38:20,037 WARN [org.kie.server.services.impl.controller.DefaultRestControlle
    rImpl] (KieServer-ControllerConnect) Exception encountered while syncing with co
    ntroller at http://localhost:8080/kie-wb/rest/controller/server/wildfly-kieserve
    r error Error while sending PUT request to http://localhost:8080/kie-wb/rest/con
    troller/server/wildfly-kieserver response code 405

  23. Hi I downloaded wildfly-8.1, and the war file this blog. I am running using jdk 1.7.
    I am getting the following 405 error.
    I added user with role : admin, kie-server,rest-all
    localhost:8080 shows wildfy8 is running, but http://localhost:8080/kie-wb gives 404 error
    Thank you.
    14:38:20,037 WARN [org.kie.server.services.impl.controller.DefaultRestControlle
    rImpl] (KieServer-ControllerConnect) Exception encountered while syncing with co
    ntroller at http://localhost:8080/kie-wb/rest/controller/server/wildfly-kieserve
    r error Error while sending PUT request to http://localhost:8080/kie-wb/rest/con
    troller/server/wildfly-kieserver response code 405

  24. Hi maciej,
    I follow your post and i deployed kie workbench on tomcat but when i am connecting workbench
    to mysql i am getting some error.could you tell me how come i can out from this error..
    Caused by: org.hibernate.service.jndi.JndiException: Unable to lookup JNDI name [java:comp/env/jdbc/jbpm]
    Caused by: javax.naming.NamingException: no resource registered with uniqueName 'jdbc/jbpm', available resources: [jdbc/jbpmDS]

  25. Hi, I'm try to get it working kie on tomcat 7 and getting the below error, kie unable to deploy:

    java.lang.RuntimeException: https://github.com/guvnorngtestuser1/jbpm-console-ng-playground-kjar.git: cannot open git-upload-pack
    at org.guvnor.structure.backend.repositories.git.GitRepositoryBuilder.createFileSystem(GitRepositoryBuilder.java:139)
    at org.guvnor.structure.backend.repositories.git.GitRepositoryBuilder.build(GitRepositoryBuilder.java:61)
    at org.guvnor.structure.backend.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:64)
    at org.guvnor.structure.backend.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)
    at org.guvnor.structure.backend.repositories.RepositoryFactoryImpl.newRepository(RepositoryFactoryImpl.java:61)

  26. This is really an interesting blog as it focuses on the very important topic. i came to know about so many things or tips.
    Herbal Incense

  27. This is really an interesting blog as it focuses on the very important topic. i came to know about so many things or tips.
    Herbal Incense

  28. Hi,

    I have the kieserver and workbench running on same server as instructed above using

    ./standalone.sh --server-config=standalone-full.xml -Dorg.kie.server.id=wildfly-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller

    Is there a way to run multiple servers on same box. For example:

    Thanks in advance for your help.


    1. nope, this is not possible as they are given as system property and thus are global for single jvm/server instance

  29. Hi, need your help with the deployment of workbench. I installed wildfly 9.0.2 final from their website (Java EE7 Full & Web Distribution). I then added an admin user in the managemenr realm and 2 users in application realm with the same credentials as you suggested. Then i downloaded the .war 2 files from the above link, changed their name and copied them in the deployement folder. Post all this i use:
    ./standalone.sh --server-config=standalone-full.xml -Dorg.kie.server.id=wildfly-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller

    command on my terminal to start the server. I was able to start the wildfly server and the Kie server got deployed but workbench deployment failed for some reason.
    I get the following warning:
    WARN [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/kie-wb/rest/controller/server/wildfly-kieserver error Error while sending PUT request to http://localhost:8080/kie-wb/rest/controller/server/wildfly-kieserver response code 405

    and the following message on my terminal:

    service jboss.ws.endpoint."kie-wb.war".CommandWebService (new available)
    WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."kie-wb.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."kie-wb.war".WeldStartService: Failed to start service

    Please do help.. have been trying to figure it out.


  30. Hi.

    I followed the instructions above but for versions 6.5 with the corresponding kie-tomcat-integration-6.5.0-Final.jar, my workbench won't come up. I'm using the H2 connector. In my catalina.out for my tomcat, I see this in the log repeating every few seconds.

    org.kie.server.services.impl.controller.DefaultRestControllerImpl connect
    WARNING: Exception encountered while syncing with controller at http://localhost:8080/kie-wb/rest/controller/server/tomcat-kieserver error Error while sending PUT request to http://localhost:8080/kie-wb/rest/controller/server/tomcat-kieserver response code 500

    http://localhost:8080/kie-server/services/rest/server seems to be working fine.

    Any advice on what could be causing the 500 error code?


    1. I resolved it. There is a README in the kie-wb war that talks about configuring JEE security for kie-wb on tomcat. It didn't seem to be a necessary step for 6.3, but is for 6.5

    2. Can you please tell me the exact procedure to start the both servers

  31. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in DROOLS TRAINING, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on TECHNOLOGY. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Sangita Mohanty
    E-mail: sangita@maxmunus.com
    Skype id: training_maxmunus
    Ph:(0) 9738075708 / 080 - 41103383

  32. I honestly love your blog. It was very useful and it inspired me a whole lot. Thanks for sharing
    Herbal Incense

  33. Hi
    Can any one help me to fix this issue, i installed both kie server and workbench in ubuntu .But am getting below error
    Caused by: org.uberfire.java.nio.IOException: java.io.IOException: Failed to open server socket for /
    at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.buildAndStartDaemon(JGitFileSystemProvider.java:508)
    at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.(JGitFileSystemProvider.java:374)
    at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.(JGitFileSystemProvider.java:343)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 70 more
    Caused by: java.io.IOException: Failed to open server socket for /
    at org.uberfire.java.nio.fs.jgit.daemon.git.Daemon.start(Daemon.java:197)
    at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.buildAndStartDaemon(JGitFileSystemProvider.java:506)

    1. looks like there is already something bound to port 9418. Maybe another instance of workbench is still running

  34. Hi,

    It's a great blog and thanks for all the info. I'm trying this out for KIE 7 on tomcat 8. The KIE server is working but the workbench is giving me the following error:

    bitronix.tm.BitronixTransactionManager cannot be cast to javax.transaction.TransactionManager

    I have both btm-2.1.4.jar and jta-1.1.jar

    1. workbench in version 7 does not use bitronix as it does not have execution engine at all so it should not need that at all. If you share complete stack trace that might help in identifying the root cause.

    2. Ten komentarz został usunięty przez autora.

  35. Hi Maciej,

    Thanks for all the information, your blog is great and very informative too! I was wondering if you could help me clarify a couple of points on the Workbench you mentioned above and also on my own Drools requirement. I would like to use version 7.2.0 of the WorkBench for it's UI capabilities to generate DRL's and store these in an Oracle Database. The rules will be executed by an existing Spring Boot application at runtime and loaded into the KieSession when the app starts.

    If i want to use the Workbench for generating and storing rules in an Oracle Database do I need the kie-server component you mentioned above even if the rules will be executed by a separate application?
    Also, is it possible to deploy the Workbench into an existing Spring Boot application without having to deploy it to another stand alone Tomcat Server??



  36. Ten komentarz został usunięty przez autora.

  37. I'm trying to add a new Database Driver (com\oracle\jdbc\ojdbc7\ using version 7.2.0 of the Workbench but it doesn't allow me to click finish after entering all information.

    After reading your documentation it states "Some commercial database drivers (like Oracle) are not available in the maven central repository. You can use those by first uploading them via Artifact Repository perspective and then continue with the driver configuration as for the drivers available in the maven central repository" but when I try uploading the JAR File via the Artifact Repository option under Authoring=>Artifact Repository=>Upload=>Select My Oracle Driver JAR File, the upload fails saying "Upload failed:null"?

  38. Weblogic server 12c, KIE-Workbench 6.5 (weblogic war) and kie-server (ee7) on windows.
    Updated startWeblogic.cmd and added this at the end:
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dorg.kie.server.id=jboss-kieserver -Dorg.kie.server.location=http://localhost:7001/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:7001/kie-wb/rest/controller -Dorg.kie.server.persistence.ds=java:jdbc/jbpm -Dorg.kie.server.persistence.dialect=org.hibernate.dialect.H2Dialect -DANTLR_USE_DIRECT_CLASS_LOADING=true -Dorg.kie.active.profile=full

    All default user, role, password whatever instructed above is there. Followed every line of instruction given here:

    Still seeing this when hitting:

    Error when initializing server extension of type jBPM KIE Server extension due to Unable to create EntityManagerFactory due to [PersistenceUnit: org.jbpm.domain] Unable to build EntityManagerFactory


    Tried both 7001 and 8230 as port of kie-server in startWeblogic.cmd.

    Please help resolve this issue.

  39. The "buildEntityManagerFactory" issue mentioned above is resolved by updating the JAVA_OPTION in startWeblogic.cmd to the following:
    set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS% -Djavax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory -Dorg.uberfire.start.method=ejb -Dorg.uberfire.domain=OracleDefaultLoginConfiguration -Dorg.kie.demo=false -Dorg.uberfire.nio.git.ssh.enabled=false -Dorg.uberfire.nio.git.daemon.enabled=false -Dorg.uberfire.nio.git.dir=D:\dev\git -Dkie.server.jms.queues.response=jms/KIE.SERVER.RESPONSE -Dorg.jbpm.designer.perspective=ruleflow -Dorg.uberfire.start.method=ejb -Dorg.uberfire.domain=OracleDefaultLoginConfiguration -Dorg.kie.executor.jms.cf=jms/cf/KIE.EXECUTOR -Dorg.kie.executor.jms.queue=jms/KIE.EXECUTOR -Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true -Dorg.kie.server.id=default-kie-server -Dorg.kie.server.controller=http://localhost:7001/kie-wb/rest/controller -Dorg.kie.server.location=http://localhost:7001/kie-server/services/rest/server -Dorg.kie.server.persistence.ds=jdbc/jbpm -Dorg.kie.server.persistence.dialect=org.hibernate.dialect.H2Dialect -Dorg.kie.server.persistence.tm=org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform -Dorg.kie.server.domain=OracleDefaultLoginConfiguration -Dorg.jbpm.server.ext.disabled=true

    However, I am still not able to see the remote server "default-kie-server" mentioned above as kie.server.id in KIE workbench->Deploy->Execution Server

    The response on hitting "http://localhost:7001/kie-server/services/rest/server" is




    And hitting "http://localhost:7001/kie-server/services/rest/server/containers" results in:->

    Obviously because I am yet to see the remote server on kie workbench and has not created any containers.
    My question is why I am not seeing the remote server on kie workbench? What else required to be done.
    Environment: weblogic 12c, kie workbench (6.5.0 final) and kie server ee7 (6.5) , Windows 7 Professional.

  40. hi
    i am using kie-server rest api to start workflow. but it doesn't render in kie-workbench.
    i deployed both same version 6.5.1-final on tomcat 7. mai i know why it is happening.

    please help to resolve this issue