question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoClassDefFoundError: org/springframework/cloud/openfeign/ribbon/LoadBalancerFeignClient when using spring-cloud-dependencies:2020.0.0

See original GitHub issue

Using implementation "io.opentracing.contrib:opentracing-spring-jaeger-cloud-starter:3.2.2" I upgraded to the new mavenBom "org.springframework.cloud:spring-cloud-dependencies:2020.0.0"

spring-cloud ‘Hoxton.SR9’ worked correctly

Since then I get the following error on startup. It seems ribbon was removed from spring cloud in 2020 but is required by jaeger (but not included) with spring-jaeger

Removing spring-jaeger and my application works correctly with spring-cloud 2020

It looks like simply updating the cloud version in java-spring-cloud is not so easy, is a migration planned?

Caused by:
  java.lang.NoClassDefFoundError: org/springframework/cloud/openfeign/ribbon/LoadBalancerFeignClient
      at io.opentracing.contrib.spring.cloud.feign.TracedFeignBeanFactory.from(TracedFeignBeanFactory.java:40)
      at io.opentracing.contrib.spring.cloud.feign.TraceFeignContext.addTracingClient(TraceFeignContext.java:64)
      at io.opentracing.contrib.spring.cloud.feign.TraceFeignContext.getInstance(TraceFeignContext.java:46)
      at org.springframework.cloud.openfeign.FeignClientFactoryBean.get(FeignClientFactoryBean.java:272)
      at org.springframework.cloud.openfeign.FeignClientFactoryBean.feign(FeignClientFactoryBean.java:99)
      at org.springframework.cloud.openfeign.FeignClientFactoryBean.getTarget(FeignClientFactoryBean.java:325)
      at org.springframework.cloud.openfeign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:315)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169)
     ... 149 more

a

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:32
  • Comments:14

github_iconTop GitHub Comments

19reactions
rajurathi1112commented, Mar 8, 2021

fyi , after adding below in property file , we are not seeing this error . hope this helps …

opentracing.spring.cloud.feign.enabled=false

12reactions
AhHa45commented, Sep 17, 2021

instead of this hacky workaround I’d simply exclude opentracing-spring-cloud-feign-starter from your build. This solved the issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I solve "java.lang.NoClassDefFoundError"?
After you compile your code, you end up with .class files for each class ... The NoClassDefFoundError indicates that the classloader (in this...
Read more >
NoClassDefFoundError (Java Platform SE 8 )
Constructs a NoClassDefFoundError with the specified detail message. Method Summary. Methods inherited from class java.lang.Throwable · addSuppressed, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found