java - Maven dependency identically with the NuGet package - Stack Overflow

admin2025-04-20  0

One of my functions in my function app is throwing an exception after it is upgraded to run on Java runtime 11.

The function works as designed, and completes the whole flow it is built to.

Error building configuration in an external startup class. One or more loaded extensions do not meet the minimum requirements. For more information see .
ExtensionStartupType AzureStorageWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.0.4.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.Storage to 4.0.4 or later.

The exception is not occurring consistently.

It is a Java project built with Maven and all necessary dependency is updated to the latest

version.
        <dependency>
            <groupId>com.microsoft.azure.functions</groupId>
            <artifactId>azure-functions-java-library</artifactId>
            <version>3.1.0</version>
        </dependency>

Since the exception contains the following message Maven dependency is identically with the NuGet package reference for Microsoft.Azure.WebJobs.Extensions.Storage to 4.0.4.

I have already tried with the following maven dependency since it is a Java Project,

   <!-- .microsoft.azure/azure-storage -->
    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-storage</artifactId>
        <version>5.1.0</version>
    </dependency>

But it results in error 500 internal server error:

One of my functions in my function app is throwing an exception after it is upgraded to run on Java runtime 11.

The function works as designed, and completes the whole flow it is built to.

Error building configuration in an external startup class. One or more loaded extensions do not meet the minimum requirements. For more information see https://aka.ms/func-min-extension-versions.
ExtensionStartupType AzureStorageWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.0.4.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.Storage to 4.0.4 or later.

The exception is not occurring consistently.

It is a Java project built with Maven and all necessary dependency is updated to the latest

version.
        <dependency>
            <groupId>com.microsoft.azure.functions</groupId>
            <artifactId>azure-functions-java-library</artifactId>
            <version>3.1.0</version>
        </dependency>

Since the exception contains the following message Maven dependency is identically with the NuGet package reference for Microsoft.Azure.WebJobs.Extensions.Storage to 4.0.4.

I have already tried with the following maven dependency since it is a Java Project,

   <!-- https://mvnrepository/artifact/com.microsoft.azure/azure-storage -->
    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-storage</artifactId>
        <version>5.1.0</version>
    </dependency>

But it results in error 500 internal server error:

Share Improve this question asked Mar 2 at 12:07 user1610446user1610446 316 bronze badges 8
  • I think this is not related to the dependency but either function.json or host.json. Can you show those? – Rob Spoor Commented Mar 2 at 12:14
  • @user1610446 Update your host.json to use extension bundle version [3.*, 4.0.0) and ensure azure-webjobs-extensions-storage dependency is version 4.0.5 or higher. – Dasari Kamali Commented Mar 3 at 3:35
  • 1 @user1610446 Try using the azure-storage-blob dependency. – Dasari Kamali Commented Mar 3 at 9:05
  • 1 @DasariKamali using dependency 'azure-storage-blob' and updating host.json file solve the Issue. – user1610446 Commented Mar 3 at 13:18
  • 1 @DasariKamali issue solved: had to include both dependencies, azure-storage-queue and azure-storage-blob and changed version to [3.*, 4.0.0] in hos.json. – user1610446 Commented Mar 5 at 8:40
 |  Show 3 more comments

1 Answer 1

Reset to default 0

Maven dependency is identically with the NuGet package reference for Microsoft.Azure.WebJobs.Extensions.Storage to 4.0.4.

To fix the issue, you should update the Maven dependencies to the latest versions for Azure Functions, Azure Storage Blob and Azure Storage Queue.

You can check the latest Maven dependencies for azure-storage-blob and azure-storage-queue.

pom.xml :

<dependency>
    <groupId>com.microsoft.azure.functions</groupId>
    <artifactId>azure-functions-java-library</artifactId>
    <version>3.1.0</version>
</dependency>
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-storage-blob</artifactId>
    <version>11.0.1</version>
</dependency>
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-storage-queue</artifactId>
    <version>12.24.1</version>
</dependency>

host.json :

Make sure the host.json specifies the correct extension bundle.

{
  "version": "2.0",
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[3.*, 4.0.0)"
  }
}
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745123117a286265.html

最新回复(0)