GithubHelp home page GithubHelp logo

Comments (13)

rtarasov avatar rtarasov commented on July 17, 2024 1

from java-spring-jaeger.

geoand avatar geoand commented on July 17, 2024

Hi @rtarasov

Could we please see your pom.xml of the application that generates the first error?

from java-spring-jaeger.

rtarasov avatar rtarasov commented on July 17, 2024

hi Georgios @geoand !

Thank you for the prompt reply.
Below is my pom.xml:


4.0.0

<groupId>com.example</groupId>
<artifactId>demo-opentracing-2nd</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>demo-opentracing</name>
<description>Demo project for Spring Boot</description>

<parent>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-parent</artifactId>
	<version>1.5.3.RELEASE</version>
	<relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	<java.version>1.8</java.version>
</properties>

<dependencies>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>

	<dependency>
	  <groupId>io.opentracing.contrib</groupId>
	  <artifactId>opentracing-spring-jaeger-cloud-starter</artifactId>
	  <version>0.2.2</version>
	</dependency>

	<dependency>
		<groupId>com.uber.jaeger</groupId>
		<artifactId>jaeger-core</artifactId>
		<version>0.18.0</version>
	</dependency>

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-test</artifactId>
		<scope>test</scope>
	</dependency>
</dependencies>

<build>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
		</plugin>
	</plugins>
</build>

Thank you in advance!

Roman.

from java-spring-jaeger.

geoand avatar geoand commented on July 17, 2024

Hi Roman,

Can you please remove

	<dependency>
		<groupId>com.uber.jaeger</groupId>
		<artifactId>jaeger-core</artifactId>
		<version>0.18.0</version>
	</dependency>

and try it out?

That is a pretty old version that is almost certainly incompatible with the what the starter uses (see here)

from java-spring-jaeger.

rtarasov avatar rtarasov commented on July 17, 2024

Georgios!

If I comment out that dependency and comment the bean provider method I get:

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reporter' defined in class path resource [io/opentracing/contrib/java/spring/jaeger/starter/JaegerAutoConfiguration.class]: Unsatisfied dependency expressed through method 'reporter' parameter 2; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'io.opentracing.contrib.java.spring.jaeger.starter.ReporterAppender' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=false)}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
.................................................
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'io.opentracing.contrib.java.spring.jaeger.starter.ReporterAppender' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=false)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1486)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467)

from java-spring-jaeger.

geoand avatar geoand commented on July 17, 2024

That's weird. Can you please post your Java Spring configuration?

from java-spring-jaeger.

rtarasov avatar rtarasov commented on July 17, 2024

Spring config is empty. Only server.port is present there. I have commented out all bean providers also! So it is bold application!

from java-spring-jaeger.

geoand avatar geoand commented on July 17, 2024

Would it be possible to zip it and upload it so I can try it?

from java-spring-jaeger.

rtarasov avatar rtarasov commented on July 17, 2024

spring-boot-2.zip

Than you Georgios!
Please find attached!

from java-spring-jaeger.

geoand avatar geoand commented on July 17, 2024

Cool, I'll give it a shot

from java-spring-jaeger.

geoand avatar geoand commented on July 17, 2024

This is a bug in the Spring Boot version that is being used in your app. Basically it's ignoring required = false in @Autowired.

If you update to say 1.5.19.RELEASE, the application should work just fine

from java-spring-jaeger.

rtarasov avatar rtarasov commented on July 17, 2024

Thank you Georgios! It works!

from java-spring-jaeger.

geoand avatar geoand commented on July 17, 2024

Glad to hear it!

I will close the issue then.

from java-spring-jaeger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.