Error creating bean with name 'springCloudAzureDefaultCredential'

santiago barbieri 65 Reputation points
2023-04-30T21:57:17.6566667+00:00

I am trying to run a Spring Boot App using the library spring-cloud-azure-stream-binder-eventhubs

I am having the following error:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2023-04-30 18:53:06.552 ERROR 6003 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springCloudAzureDefaultCredential' defined in class path resource [com/azure/spring/cloud/autoconfigure/context/AzureTokenCredentialAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.core.credential.TokenCredential]: Factory method 'tokenCredential' threw exception; nested exception is java.lang.NoClassDefFoundError: io/netty/util/AttributeKey

Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
124 questions
{count} votes

1 answer

Sort by: Most helpful
  1. santiago barbieri 65 Reputation points
    2023-04-30T23:31:17.51+00:00

    I found the solution. The problem was the library netty-common-4.1.89.Final.jar. I deleted it. Then, I rebuild my project

    0 comments No comments

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.