NoSuchMethodError in java-cf-env 3.5.0 and Spring Boot 4 on Java 25
search cancel

NoSuchMethodError in java-cf-env 3.5.0 and Spring Boot 4 on Java 25

book

Article ID: 429383

calendar_today

Updated On:

Products

VMware Tanzu Spring Runtime

Issue/Introduction

The java-cf-env 3.5.0 library contains a vendored Micrometer version that is incompatible with the Spring Boot 4 runtime on Java 25, resulting in a NoSuchMethodError similar to: 

java.lang.NoSuchMethodError: 'java.lang.Iterable io.micrometer.observation.transport.Propagator$Getter.getAll(java.lang.Object, java.lang.String)'
 at io.micrometer.tracing.handler.PropagatingReceiverTracingObservationHandler$1.getAll(PropagatingReceiverTracingObservationHandler.java:68)
 at io.micrometer.tracing.otel.bridge.OtelPropagator$1.getAll(OtelPropagator.java:87)
 at io.opentelemetry.api.baggage.propagation.W3CBaggagePropagator.extractMulti(W3CBaggagePropagator.java:104)
 at io.opentelemetry.api.baggage.propagation.W3CBaggagePropagator.extract(W3CBaggagePropagator.java:99)
...

Environment

Elastic Application Runtime 10.2 

Cause

This occurs because the internal Micrometer signatures in the 3.5.0 line do not align with the updated requirements of the Boot 4 framework.

Resolution

Update your application dependency to java-cf-env version 4.0.0 or higher, which provides native compatibility with Spring Boot 4 and Java 25.