TaskOrchestrationContext parameter in orchestrator throws instantiation error

Zakary Kurzawski 105 Reputation points
2023-06-20T20:58:36.8366667+00:00

I am working on a durable function and copied the template from the product documentation:
https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-orchestrations?tabs=java
I changed the body of the orchestrator method to fit my application and get no compile errors.
However, when I run the app locally, I get a runtime error:

[2023-06-20T20:55:36.078Z] ---> Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException: Result: Failure

Exception: UnsupportedOperationException: Interface can't be instantiated! Interface name: com.microsoft.durabletask.TaskOrchestrationContext

Stack: java.lang.RuntimeException: Unable to create instance of interface com.microsoft.durabletask.TaskOrchestrationContext.

I am running FUNCTIONS_EXTENSION_VERSION ~4 and Java 11.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,912 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,625 questions
{count} votes

Accepted answer
  1. navba-MSFT 27,540 Reputation points Microsoft Employee Moderator
    2023-06-27T17:15:22.8866667+00:00

    @Zakary Kurzawski While I had a closer look at the exception callstack and compared it with your Core tools version. Seems like your core tools version is too old and the logics to support durable function java is not included in this version of host. That seems to be the reason causing this issue. 

    Could you please use the latest core tools and try again ? Hope this helps.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.