zipkin-reporter-java icon indicating copy to clipboard operation
zipkin-reporter-java copied to clipboard

Issue with springboot v3.3 - Application fails to start

Open ashishqcs opened this issue 1 year ago • 1 comments

I recently upgraded to springboot 3.3, after which the app is failing during startup. Service is hosted on gcp. Error:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [zipkin2.reporter.AsyncReporter]: Factory method 'stackdriverReporter' threw exception with message: Receiver class zipkin2.reporter.stackdriver.StackdriverSender does not define or inherit an implementation of the resolved method 'abstract zipkin2.reporter.Encoding encoding()' of interface zipkin2.reporter.BytesMessageSender.
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644)
	... 142 common frames omitted
Caused by: java.lang.AbstractMethodError: Receiver class zipkin2.reporter.stackdriver.StackdriverSender does not define or inherit an implementation of the resolved method 'abstract zipkin2.reporter.Encoding encoding()' of interface zipkin2.reporter.BytesMessageSender.
	at zipkin2.reporter.AsyncReporter$Builder.<init>(AsyncReporter.java:104)
	at zipkin2.reporter.AsyncReporter.builder(AsyncReporter.java:64)
	at zipkin2.reporter.AsyncReporter.builder(AsyncReporter.java:59)
	at com.google.cloud.spring.autoconfigure.trace.StackdriverTraceAutoConfiguration.stackdriverReporter(StackdriverTraceAutoConfiguration.java:178)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
	... 143 common frames omitted

I am using following tracing dependencies:

  implementation 'com.google.cloud:spring-cloud-gcp-starter-trace'
  implementation 'io.micrometer:micrometer-tracing-bridge-brave:1.3.0'
  implementation 'com.google.cloud:spring-cloud-gcp-starter-metrics'

I checked dependency tree and noticed all zipkin / brave related dependencies are on latest version available.

for eg: zipkin-reporter-java v3.4

Any idea on why this might be happening ?

ashishqcs avatar May 27 '24 10:05 ashishqcs

I think the cause is identified here https://github.com/spring-projects/spring-boot/issues/40914 already

reta avatar May 27 '24 12:05 reta

We'll collect advice in #269

codefromthecrypt avatar Aug 03 '24 12:08 codefromthecrypt