作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试执行 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/
我正在尝试执行 https://cadenceworkflow.io/docs/06_javaclient/01_quick_start 中提供的 Cadence java 客户端示例当我使用 CLI
我是一名优秀的程序员,十分优秀!