Skip to content

Zipkin Autoconfiguration is failing in actuator as readTimeout is deprecated in HttpComponentsClientHttpRequestFactory #32982

Closed as not planned
@rajadilipkolli

Description

@rajadilipkolli

I am using Spring boot 3.0.0-RC1 and using new micrometer Observability. When spring boot is trying to create a bean of type ZipkinRestTemplateSender here it couldn't create as readTimeOut is deprecated in HttpComponentsClientHttpRequestFactory

Below is the stacktrace

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'openTelemetry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Unsatisfied dependency expressed through method 'openTelemetry' parameter 0: Error creating bean with name 'otelSdkTracerProvider' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Failed to instantiate [io.opentelemetry.sdk.trace.SdkTracerProvider]: Factory method 'otelSdkTracerProvider' threw exception with message: Error creating bean with name 'otelSpanProcessor' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Failed to instantiate [io.opentelemetry.sdk.trace.SpanProcessor]: Factory method 'otelSpanProcessor' threw exception with message: Error creating bean with name 'zipkinSpanExporter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurations$OpenTelemetryConfiguration.class]: Unsatisfied dependency expressed through method 'zipkinSpanExporter' parameter 1: Error creating bean with name 'restTemplateSender' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurations$RestTemplateSenderConfiguration.class]: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinRestTemplateSender]: Factory method 'restTemplateSender' threw exception with message: Request factory class org.springframework.http.client.HttpComponentsClientHttpRequestFactory has the setReadTimeout method marked as deprecated
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:793)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:543)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324)

Exception is that this configuration shouldn't stop starting application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions