0

APPLICATION FAILED TO START


Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

com.microsoft.azure.telemetry.TelemetrySender.sendTelemetryData(TelemetrySender.java:58)

The following method did not exist:

'org.springframework.http.HttpStatus org.springframework.http.ResponseEntity.getStatusCode()'

The calling method's class, com.microsoft.azure.telemetry.TelemetrySender, was loaded from the following location:

jar:file:/home/spiritbear/.m2/repository/com/microsoft/azure/azure-spring-boot/2.2.1/azure-spring-boot-2.2.1.jar!/com/microsoft/azure/telemetry/TelemetrySender.class

The called method's class, org.springframework.http.ResponseEntity, is available from the following locations:

jar:file:/home/spiritbear/.m2/repository/org/springframework/spring-web/6.0.3/spring-web-6.0.3.jar!/org/springframework/http/ResponseEntity.class

The called method's class hierarchy was loaded from the following locations:

org.springframework.http.ResponseEntity: file:/home/spiritbear/.m2/repository/org/springframework/spring-web/6.0.3/spring-web-6.0.3.jar
org.springframework.http.HttpEntity: file:/home/spiritbear/.m2/repository/org/springframework/spring-web/6.0.3/spring-web-6.0.3.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes com.microsoft.azure.telemetry.TelemetrySender and org.springframework.http.ResponseEntity

resolve this conflict

1 Answers1

0

The azure sdk has migrated so you would need to add the following dependencies in your pom.xml.

 <dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.azure.spring</groupId>
      <artifactId>spring-cloud-azure-dependencies</artifactId>
      <version>5.0.0</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

Also, add the following starter

<dependency>
  <groupId>com.azure.spring</groupId>
  <artifactId>spring-cloud-azure-starter-keyvault</artifactId>
</dependency>

This should resolve your issues. I faced a similar problem migrating an azure based spring boot project from Spring 5.x to 6.x

Sameer
  • 67
  • 1
  • 10