Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiver class org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinRestTemplateSender does not define or inherit an implementation of the resolved method #6251

Open
rupan-adn opened this issue Feb 26, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@rupan-adn
Copy link

rupan-adn commented Feb 26, 2024

Describe the bug
Application does not start with version 1.35.0

Steps to reproduce
A spring boot application (version 3.2.3) with the following dependencies (shortened list)

    implementation "org.jolokia:jolokia-core:${JOLOKIA_VERSION}"
    implementation "org.springframework.boot:spring-boot-starter-web"
    implementation "org.springframework.boot:spring-boot-starter-security"
    implementation "org.springframework.boot:spring-boot-starter-actuator"
    implementation "de.codecentric:spring-boot-admin-starter-client:${SPRING_BOOT_ADMIN_VERSION}"
    implementation "net.logstash.logback:logstash-logback-encoder:${LOGBACK_VERSION}"
    implementation "com.github.loki4j:loki-logback-appender:${LOKI_LOGBACK_APPENDER}"
    implementation "org.flywaydb:flyway-core"

    implementation "org.springframework.boot:spring-boot-starter-aop"
    implementation 'io.micrometer:micrometer-observation'
    implementation "io.micrometer:micrometer-tracing-bridge-otel"
    implementation "io.opentelemetry:opentelemetry-exporter-zipkin:${OPENTELEMETRY_EXPORTER_ZIPKIN_VERSION}"
    implementation "io.micrometer:micrometer-registry-prometheus"

What did you expect to see?
Application coming up when starting with bootRun

What did you see instead?

Full log is attached error.log

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
15:42:00.521 ERROR [samariter-bff,,,] 126672 --- [samariter-bff] [           main] [                                                 ] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Unable to start web server
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:165)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:618)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
        at org.homelinux.digsim.samariter.application.SamariterApplication.main(SamariterApplication.java:12)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:145)
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:105)
        at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:499)
        at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:218)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:188)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162)
        ... 8 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcObservationFilter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/observation/web/servlet/WebMvcObservationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'webMvcObservationFilter' parameter 0: Error creating bean with name 'observationRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/observation/ObservationAutoConfiguration.class]: Error creating bean with name 'defaultTracingObservationHandler' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/MicrometerTracingAutoConfiguration.class]: Unsatisfied dependency expressed through method 'defaultTracingObservationHandler' parameter 0: Error creating bean with name 'micrometerOtelTracer' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Unsatisfied dependency expressed through method 'micrometerOtelTracer' parameter 0: Error creating bean with name 'otelTracer' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Unsatisfied dependency expressed through method 'otelTracer' parameter 0: Error creating bean with name 'openTelemetry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/opentelemetry/OpenTelemetryAutoConfiguration.class]: Failed to instantiate [io.opentelemetry.sdk.OpenTelemetrySdk]: Factory method 'openTelemetry' threw exception with message: Error creating bean with name 'otelSdkTracerProvider' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Unsatisfied dependency expressed through method 'otelSdkTracerProvider' parameter 1: Error creating bean with name 'spanProcessors' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.tracing.SpanProcessors]: Factory method 'spanProcessors' threw exception with message: Error creating bean with name 'otelSpanProcessor' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Unsatisfied dependency expressed through method 'otelSpanProcessor' parameter 0: Error creating bean with name 'spanExporters' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/OpenTelemetryAutoConfiguration.class]: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.tracing.SpanExporters]: Factory method 'spanExporters' 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]: Failed to instantiate [io.opentelemetry.exporter.zipkin.ZipkinSpanExporter]: Factory method 'zipkinSpanExporter' threw exception with message: Receiver class org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinRestTemplateSender 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.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:542)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
        at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:210)
        at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:201)
        at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96)
        at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:266)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:240)
        at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:52)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4866)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:845)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:240)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:921)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.startup.Tomcat.start(Tomcat.java:437)
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126)
        ... 13 common frames omitted

...
...
...
...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.tracing.SpanExporters]: Factory method 'spanExporters' 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]: Failed to instantiate [io.opentelemetry.exporter.zipkin.ZipkinSpanExporter]: Factory method 'zipkinSpanExporter' threw exception with message: Receiver class org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinRestTemplateSender 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:647)
        ... 197 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'zipkinSpanExporter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurations$OpenTelemetryConfiguration.class]: Failed to instantiate [io.opentelemetry.exporter.zipkin.ZipkinSpanExporter]: Factory method 'zipkinSpanExporter' threw exception with message: Receiver class org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinRestTemplateSender 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.ConstructorResolver.instantiate(ConstructorResolver.java:651)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:639)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1335)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1165)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1696)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1653)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1470)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1392)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory$DependencyObjectProvider.resolveStream(DefaultListableBeanFactory.java:2198)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory$DependencyObjectProvider.orderedStream(DefaultListableBeanFactory.java:2192)
        at org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryAutoConfiguration.spanExporters(OpenTelemetryAutoConfiguration.java:127)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
        ... 198 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.opentelemetry.exporter.zipkin.ZipkinSpanExporter]: Factory method 'zipkinSpanExporter' threw exception with message: Receiver class org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinRestTemplateSender 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:647)
        ... 218 common frames omitted
Caused by: java.lang.AbstractMethodError: Receiver class org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinRestTemplateSender does not define or inherit an implementation of the resolved method 'abstract zipkin2.reporter.Encoding encoding()' of interface zipkin2.reporter.BytesMessageSender.
        at io.opentelemetry.exporter.zipkin.ZipkinSpanExporter.<init>(ZipkinSpanExporter.java:57)
        at io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder.build(ZipkinSpanExporterBuilder.java:220)
        at org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinConfigurations$OpenTelemetryConfiguration.zipkinSpanExporter(ZipkinConfigurations.java:163)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
        ... 219 common frames omitted


What version and what artifacts are you using?
Artifacts: io.opentelemetry:opentelemetry-exporter-zipkin
Version: 1.35.0
How did you reference these artifacts? see above

Environment
Compiler: Azul 21
OS: "Ubuntu 22.04"

Additional context
Same setup with version 1.34.1 and lower works as expected.

@rupan-adn rupan-adn added the Bug Something isn't working label Feb 26, 2024
@jkwatson
Copy link
Contributor

I think that spring will need to update their zipkin exporter for this to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants