首页 > 解决方案 > 无法使用 Kie Workbench 注册 Kie 服务器

问题描述

“我正在将 Kie Workbench 7.5 和 Kie Server 7.5 都设置到 tomcat 8 中。但是“远程服务器”显示空白列表。

对于安装参考,我使用了http://blog.athico.com/2015/10/installing-kie-server-and-workbench-on.html这个博客。

一旦我点击http://localhost:8080/kie-server/services/rest/server这个 URL,我就会得到预期的输出,如下所示:

<response type="SUCCESS" msg="Kie Server info">
    <kie-server-info>
        <capabilities>KieServer</capabilities>
        <capabilities>BRM</capabilities>
        <capabilities>BPM</capabilities>
        <capabilities>CaseMgmt</capabilities>
        <capabilities>BPM-UI</capabilities>
        <capabilities>BRP</capabilities>
        <capabilities>DMN</capabilities>
        <capabilities>Swagger</capabilities>
        <location>
            http://localhost:8080/kie-server/services/rest/server
        </location>
        <name>tomcat-kieserver</name>
        <id>tomcat-kieserver</id>
        <version>7.5.0.Final</version>
    </kie-server-info>
</response>

我提供的配置

1.setenv.bat

set CATALINA_OPTS=-Xmx512M -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Dorg.kie.server.persistence.ds=java:comp/env/jdbc/jbpm -Djbpm.tm.jndi.lookup=java:comp/env/TransactionManager -Dorg.kie.server.persistence.tm=JBossTS -Dhibernate.connection.release_mode=after_transaction -Dorg.kie.server.id=tomcat-kieserver -Djava.security.auth.login.config=C:/softwares/apache-tomcat-8.5.43/webapps/kie-drools-wb/WEB-INF/classes/login.config -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-drools-wb/rest/controller -Dcom.arjuna.ats.jta.recovery.XAResourceRecovery1=com.arjuna.ats.internal.jdbc.recovery.BasicXARecovery;abs://C:/softwares/apache-tomcat-8.5.43/conf/xa-recovery-properties.xml

2. server.xml

<Valve className="org.kie.integration.tomcat.JACCValve" />

3.上下文.xml

<Resource name="sharedDataSource"
              auth="Container"
              type="org.h2.jdbcx.JdbcDataSource"
              user="sa"
              password="sa"
              url="jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;MVCC=TRUE"
              description="H2 Data Source"
              loginTimeout="0"
              testOnBorrow="false"
              factory="org.h2.jdbcx.JdbcDataSourceFactory"/>

4.xa-recovery-properties.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
    <entry key="DB_1_DatabaseUser">sa</entry>
    <entry key="DB_1_DatabasePassword">sa</entry>
    <entry key="DB_1_DatabaseDynamicClass"></entry>
    <entry key="DB_1_DatabaseURL">java:comp/env/h2DataSource</entry>
</properties>

在 Tomcat 控制台上,我收到以下警告:

WARNING [KieServer-ControllerConnect] org.kie.server.services.impl.controller.DefaultRestControllerImpl.connectToSingleController Exception encountered while syncing with controller at http://localhost:8080/kie-drools-wb/rest/controller/server/tomcat-kieserver error Error while sending PUT request to http://localhost:8080/kie-drools-wb/rest/controller/server/tomcat-kieserver response code 401

标签: droolskiekie-workbenchdrools-kie-server

解决方案


Workbench 7.0+ 不再支持 Tomcat。如果你想使用 Workbench(它已经重命名为 Business Central 并且具有最新版本 7.24),它应该在 Wildfly 14 上运行。

您可以尝试此快速入门(只需解压缩文件即可尝试或复制配置):https ://www.jbpm.org/learn/gettingStarted.html

如果需要在 Tomcat 上启动 Workbench,则应使用 6.x(不再支持)。


推荐阅读