Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JBPM 6 REST接口对404的响应_Java_Rest_Jbpm - Fatal编程技术网

Java JBPM 6 REST接口对404的响应

Java JBPM 6 REST接口对404的响应,java,rest,jbpm,Java,Rest,Jbpm,当我转到http://localhost:8080/business-central server/rs/server/resources/jbpm我列出了所有可用的方法,但在BRMS 6中没有business central server应用程序,只有business central—在哪里可以找到类似的页面 我还尝试使用以下代码与REST连接: public class Test { public static void main(String[] args) throws Malf

当我转到
http://localhost:8080/business-central server/rs/server/resources/jbpm
我列出了所有可用的方法,但在BRMS 6中没有business central server应用程序,只有business central—在哪里可以找到类似的页面

我还尝试使用以下代码与REST连接:

public class Test {
    public static void main(String[] args) throws MalformedURLException {
        String deploymentId = "com.example.test:test_project:1.0";
        URL baseUrl = new URL("http://localhost:8080/business-central");
        String user = "aswu";
        String password = "uwsa@123";
        RemoteRestRuntimeFactory restSessionFactory = new RemoteRestRuntimeFactory(
                deploymentId, baseUrl, user, password);
        System.out.println("Is RemoteRestRuntimeFactory created : "
            + (restSessionFactory != null));
        RemoteRuntimeEngine runtimeEngine = restSessionFactory
                .newRuntimeEngine();
        KieSession kieSession = runtimeEngine.getKieSession();
        System.out.println("Is KieSession obtained : " + (kieSession != null));
        kieSession.startProcess("test-project.test-process");
    }
}
我有一个例外:

Exception in thread "main" java.lang.RuntimeException: Error invoking StartProcessCommand via REST (http://localhost:8080/business-central/rest/runtime/com.example.test:test_project:1.0/execute):

<html><head><title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 404 - Could not find resource for relative : /runtime/com.example.test:test_project:1.0/execute of full path: http://localhost:8080/business-central/rest/runtime/com.example.test:test_project:1.0/execute</h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u>Could not find resource for relative : /runtime/com.example.test:test_project:1.0/execute of full path: http://localhost:8080/business-central/rest/runtime/com.example.test:test_project:1.0/execute</u></p><p><b>JBWEB000069: description</b> <u>JBWEB000124: The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.2.Final-redhat-1</h3></body></html>
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:342)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:110)
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232)
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
at pl.worc.pwr.student.vl.workflow.brms.Test.main(Test.java:30)
线程“main”java.lang.RuntimeException中的异常:通过REST调用StartProcessCommand时出错(http://localhost:8080/business-central/rest/runtime/com.example.test:test_项目:1.0/execute): JBoss Web/7.2.2.Final-redhat-1-JBWEB000064:错误报告JBWEB000065:HTTP状态404-找不到相对:/runtime/com的资源。示例。测试:测试项目:1.0/执行完整路径:http://localhost:8080/business-central/rest/runtime/com.example.test:test_项目:1.0/execute
JBWEB000309:类型JBWEB000067:状态报告

JBWEB000068:消息找不到相对:/runtime/com的资源。示例。测试:测试项目:1.0/执行完整路径:http://localhost:8080/business-central/rest/runtime/com.example.test:test_项目:1.0/execute

JBWEB000069:description JBWEB000124:请求的资源不存在可用。


JBoss Web/7.2.2.Final-redhat-1 位于org.kie.services.client.api.command.AbstractRemoteCommandObject.ExecuterTestCommand(AbstractRemoteCommandObject.java:342) 位于org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:110) 位于org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232) 位于org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223) 位于pl.worc.pwr.student.vl.workflow.brms.Test.main(Test.java:30)
能否尝试将代码中的URL更改为:“http://:8080/business central server”?如果没有

,可能您已经在创作环境中安装了BRMS,而不是在执行环境中。因此您无法在其上运行该进程


谢谢您的重播。我无法与之联系,我知道了原因。业务中心服务器是BRMS 5的一部分,但不是BRMS 6。我的问题是新版本的BRMS没有执行环境,因此RESTAPI仅限于与存储库连接的部分。它在具有执行环境的BPM套件上工作。