gpt4 book ai didi

cadence-workflow - 工作流任务失败.com.uber.cadence.internal.worker.WorkflowExecutionException : java. lang.IllegalAccessException

转载 作者:行者123 更新时间:2023-12-04 14:15:36 24 4
gpt4 key购买 nike

我正在尝试执行 https://cadenceworkflow.io/docs/06_javaclient/01_quick_start 中提供的 Cadence java 客户端示例当我使用 CLI 开始工作流程时出现以下异常

09:45:02.123 [Workflow Executor taskList="HelloWorldTaskList", domain="test-domain": 1] ERROR  c.u.c.i.r.ReplayDecisionTaskHandler - Workflow task failure. startedEventId=3, WorkflowID=34e36721-641b-40fc-bbf7-37e9ae7afd92, RunID=845af22f-d982-4794-b5f2-ba6821755a04. If see continuously the workflow might be stuck.
java.lang.Error: com.uber.cadence.internal.worker.WorkflowExecutionException: java.lang.IllegalAccessException
at com.uber.cadence.internal.sync.POJOWorkflowImplementationFactory$POJOWorkflowImplementation.execute(POJOWorkflowImplementationFactory.java:239) ~[cadence-client-2.6.3.jar:na]
at com.uber.cadence.internal.sync.WorkflowRunnable.run(WorkflowRunnable.java:46) ~[cadence-client-2.6.3.jar:na]
at com.uber.cadence.internal.sync.CancellationScopeImpl.run(CancellationScopeImpl.java:102) ~[cadence-client-2.6.3.jar:na]
at com.uber.cadence.internal.sync.WorkflowThreadImpl$RunnableWrapper.run(WorkflowThreadImpl.java:85) ~[cadence-client-2.6.3.jar:na]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: com.uber.cadence.internal.worker.WorkflowExecutionException: java.lang.IllegalAccessException
at com.uber.cadence.internal.sync.POJOWorkflowImplementationFactory.mapToWorkflowExecutionException(POJOWorkflowImplementationFactory.java:356) ~[cadence-client-2.6.3.jar:na]
... 9 common frames omitted
9:49

谁能告诉我如何解决它?

最佳答案

我刚遇到同样的问题。

第一段示例代码在 HelloWorld 接口(interface)上缺少一个 public 访问修饰符。将接口(interface)设置为公共(public)后,我可以毫无问题地运行该示例。

代码应该是这样的:

import com.uber.cadence.workflow.Workflow;
import com.uber.cadence.workflow.WorkflowMethod;
import org.slf4j.Logger;

public class GettingStarted {

private static Logger logger = Workflow.getLogger(GettingStarted.class);

public interface HelloWorld {
@WorkflowMethod
void sayHello(String name);
}

}

关于cadence-workflow - 工作流任务失败.com.uber.cadence.internal.worker.WorkflowExecutionException : java. lang.IllegalAccessException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60651589/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com