我需要在 Cloudfoundry 中部署 Kie 服务器。我试图将战争文件(https://download.jboss.org/drools/release/7.0.0.Final/kie-server-distribution-7.0.0.Final.zip)推送到 CF。应用程序正在启动,但在启动时崩溃。错误:
2017-07-17T15:53:27.720-04:00 [APP/PROC/WEB/0] [OUT] [CONTAINER] org.apache.jasper.servlet.TldScanner INFO At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2017-07-17T15:53:27.746-04:00 [APP/PROC/WEB/0] [ERR] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2017-07-17T15:53:27.746-04:00 [APP/PROC/WEB/0] [ERR] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2017-07-17T15:53:27.746-04:00 [APP/PROC/WEB/0] [ERR] SLF4J: Defaulting to no-operation (NOP) logger implementation
2017-07-17T15:53:28.042-04:00 [APP/PROC/WEB/0] [OUT] at org.kie.server.services.jbpm.JbpmKieServerExtension.getPersistenceProperties(JbpmKieServerExtension.java:665)
2017-07-17T15:53:28.042-04:00 [APP/PROC/WEB/0] [OUT] java.lang.BootstrapMethodError: java.lang.IllegalAccessError: no such method: org.kie.server.services.jbpm.jpa.PersistenceUnitInfoLoader.isValidPersistenceKey(String)Boolean/invokeStatic
作为另一种选择,我尝试部署一个 docker 镜像,因为基础设施和防火墙,它需要一些云团队的时间。
有人可以建议我如何在 CF 中托管 kie 服务器和在 CF 中工作的 docker 映像(kieserver)。
更新
我还尝试使用弹簧启动来部署它,在 pom.xml 中添加 kie 服务器作为依赖项。在将其部署到 CF 之前,我正在本地尝试此操作。如果我错了,请纠正我。pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.proj</groupId>
<artifactId>proj-kie-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>proj-kie-server</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!-- Compile -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency> -->
<!-- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency> -->
<!-- Provided (for embedded war support) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.server</groupId>
<artifactId>kie-server</artifactId>
<type>pom</type>
<version>7.0.0.Final</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.kie.server</groupId>
<artifactId>kie-server</artifactId>
<version>7.0.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.projectodd.jrapidoc
</groupId>
<artifactId>
jrapidoc-rest-plugin
</artifactId>
<versionRange>
[0.5.0.Final,)
</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>KieServer</display-name>
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
<filter>
<filter-name>capture-request-filter</filter-name>
<filter-class>org.kie.server.services.impl.security.web.CaptureHttpRequestFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>capture-request-filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.kie.server.remote.rest.common.KieServerApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/services/rest/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/services/rest</param-value>
</context-param>
<security-constraint>
<web-resource-collection>
<web-resource-name>REST web resources</web-resource-name>
<url-pattern>/services/rest/*</url-pattern>
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>kie-server</role-name>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>KIE Server</realm-name>
</login-config>
<security-role>
<role-name>kie-server</role-name>
</security-role>
<security-role>
<role-name>user</role-name>
</security-role>
</web-app>
应用程序.yml
logging:
level:
root: DEBUG
server:
port: 8080
contextPath: /proj-kie-server
所以根据这个文档。我正在尝试我的这个 url -> http://localhost:8080/proj-kie-server/services/rest/server
如果启动了 kie 服务器,则假设是响应。
<response type="SUCCESS" msg="KIE Server info">
<kie-server-info>
<version>6.2.0.redhat-1</version>
</kie-server-info>
</response>
但我看到错误。
{"timestamp":1500581006629,"status":404,"error":"Not Found","message":"No message available","path":"/proj-kie-server/services/rest/server"}
我应该如何使用 spring boot 应用程序启动 kie 服务器。
谢谢你。