Java中持久功能编排失败,“功能调用导致无效响应”。

发布于 2025-02-10 05:58:47 字数 722 浏览 1 评论 0原文

通过 azure function java juckstart tutorial 试图执行我的编排功能时,要在以下异常中。

2022-06-23T06:30:19.172Z] system.private.corelib:执行函数时异常:functions.hellocities。 microsoft.azure.webjobs.extensions.durabletask:函数调用导致无效响应。这意味着编排函数是错误地实现的,耐用的任务语言SDK是错误地实现的,或者目标语言工作者没有将函数结果发送回主机。

此错误是什么意思,我该如何修复?

这是有关正在使用的Azure函数核心工具的信息,这在核心工具的输出中显示:

Azure Functions Core Tools
Core Tools Version:       3.0.3734 Commit hash: 61192bb28820be76916f85209916152801483456  (64-bit)
Function Runtime Version: 3.1.4.0

When running through the Azure Functions Java quickstart tutorial, I ran into the following exception while trying to execute my orchestrator function.

2022-06-23T06:30:19.172Z] System.Private.CoreLib: Exception while executing function: Functions.HelloCities. Microsoft.Azure.WebJobs.Extensions.DurableTask: The function invocation resulted in a null response. This means that either the orchestrator function was implemented incorrectly, the Durable Task language SDK was implemented incorrectly, or that the destination language worker is not sending the function result back to the host.

What does this error mean and how do I fix it?

Here's the information about the Azure Functions Core Tools being used, which is shown in the output of the core tools:

Azure Functions Core Tools
Core Tools Version:       3.0.3734 Commit hash: 61192bb28820be76916f85209916152801483456  (64-bit)
Function Runtime Version: 3.1.4.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晚雾 2025-02-17 05:58:47

There are few potential causes for this error:

  1. An orchestration trigger function returned a null value directly to the trigger.
  2. 语言工作者尚未(尚未)知道如何从编排触发功能中处理返回值,因此始终将null值返回到主机。

对于上下文,耐用的功能编排和活动触发器与所有其他触发器都不同,因为它们支持返回值。 Azure函数中没有其他触发类型支持这一点(使用其他触发类型时,您可以将值返回为输出绑定,但不能直接返回触发器本身)。为了支持持久的功能,诸如Java之类的语言工人需要增加为处理这些返回值的支持。只有Java工人的最新版本才能得到此支持。

在这种特定情况下,发生此错误是因为正在使用Azure函数核心工具的旧构建。您可以从上方的输出中看到Azure功能核心工具 v3.0.3734 已安装。但是,功能v3.x的最小版本是 v3.0.4585 。当使用Azure函数v4.x时,最低所需版本为 v4.0.4590

升级到最新版本的功能核心工具将解决此问题。可以找到有关安装Azure函数核心工具的各种方法的信息在这里

There are few potential causes for this error:

  1. An orchestration trigger function returned a null value directly to the trigger.
  2. The language worker doesn't (yet) know how to handle return values from orchestration trigger functions, and thus always returns null value back to the host.

For context, Durable Functions orchestration and activity triggers are different from all other triggers because they support return values. No other trigger types in Azure Functions support this (you can return values as output bindings when using other trigger types, but not return values directly to the trigger itself). To support Durable Functions, language workers such as Java needed to add support for handling these return values. Only the latest versions of the Java workers have this support.

In this specific case, this error is happening because an older build of the Azure Functions Core Tools is being used. You can see from the output above that Azure Functions Core Tools v3.0.3734 is installed. However, the minimum required version for Functions v3.x is v3.0.4585. When using Azure Functions v4.x, the minimum required version is v4.0.4590.

Upgrading to the latest version of the Functions Core tools will resolve this issue. Information about the various ways to install the Azure Functions Core Tools can be found here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文