drools - 无法使用 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
解决方案
Workbench 7.0+ 不再支持 Tomcat。如果你想使用 Workbench(它已经重命名为 Business Central 并且具有最新版本 7.24),它应该在 Wildfly 14 上运行。
您可以尝试此快速入门(只需解压缩文件即可尝试或复制配置):https ://www.jbpm.org/learn/gettingStarted.html
如果需要在 Tomcat 上启动 Workbench,则应使用 6.x(不再支持)。
推荐阅读
- node.js - 我如何检查模板并获取它的值?
- python - 如何从线程实例方法访问实例变量?
- python-3.x - Python遍历CSV的每一行以从列表中查找部分字符串匹配
- javascript - 如何在javascript中查找和获取元素的 ::after 或 ::before?
- docker - 副本之间的负载平衡/路由
- javascript - 位置绝对止损从开盘中选择下拉
- mysql - 非常简单查询的小表锁定问题
- python - 熊猫检查行内容是否在列表中
- gsap - 带有 MotionPath 和 autoRotate 的 GSAP 不起作用
- python - 有没有办法使用 sys.exit() 退出我的程序而无需在 python 中进行回溯?