-
Notifications
You must be signed in to change notification settings - Fork 143
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
NoClassDefFoundError: org/springframework/cloud/openfeign/ribbon/LoadBalancerFeignClient when using spring-cloud-dependencies:2020.0.0 #312
Comments
I can confirm the issue. We ran into the same problem when we tried to upgrade to SpringBoot 2.4.x with SpringCloud 2020.0.0 spring-cloud-netflix-ribbon has been removed from SpringCloud with this version: https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2020.0-Release-Notes#breaking-changes |
I am facing similar issue. is there any timeline to support SpringCloud 2020.0.0 ? |
fyi , after adding below in property file , we are not seeing this error . hope this helps .. opentracing.spring.cloud.feign.enabled=false |
What's the status on supporting getting this working in spring 2.4 or 2.5? What's required? How can we help? |
+1, facing same issue |
+1 |
This is the same issue as opentracing-contrib/java-spring-jaeger#127 and the author has opened the PR #324 that solves the problem. I believe we should merge the PR because the issue affects everyone who upgraded Spring Boot and uses OpenFeign. |
Same problem any workaround to fix this ? @Bean
public Client feignClient(CachingSpringLoadBalancerFactory cachingFactory, SpringClientFactory clientFactory) {
return new LoadBalancerFeignClient(new OkHttpClient(), cachingFactory, clientFactory);
} |
As a really nasty workaround in the meantime, I believe you can resolve this by defining the classes which it is looking for. This should be safe, because it won't actually use them (it just does an With that in mind, adding the following files in the correct packages "works": package org.springframework.cloud.openfeign.ribbon;
import feign.Client;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
public class LoadBalancerFeignClient {
public LoadBalancerFeignClient(Client delegate, CachingSpringLoadBalancerFactory lbClientFactory, SpringClientFactory clientFactory) {
throw new UnsupportedOperationException();
}
public Client getDelegate() {
throw new UnsupportedOperationException();
}
} package org.springframework.cloud.netflix.ribbon;
public class SpringClientFactory {} package org.springframework.cloud.openfeign.ribbon;
public class CachingSpringLoadBalancerFactory {} |
It worked for me! Thanks so lot @davidje13 |
I resolved this problem adding this dependency
|
Thank you @davidje13, this worked for me |
facing same issue |
this class seems has been replaced by org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient |
it works, But at the same time, we also lost the track from openfeign. |
Using
implementation "io.opentracing.contrib:opentracing-spring-jaeger-cloud-starter:3.2.2"
I upgraded to the newmavenBom "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?
a
The text was updated successfully, but these errors were encountered: