java.lang.ClassNotFoundException: feign.optionals.OptionalDecoder

See original GitHub issue

<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Finchley.M9</version> <type>pom</type> <scope>import</scope> </dependency>

The First Question: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> </dependency> In the spring cloud Finchley.M9, the annotation of ‘@feignclient’ could not be found. why need to add the dependency of ‘spring-cloud-openfeign-core’?

the second Question: in my project, when dependency other *.jar(the jar is feign project) in error java.lang.ClassNotFoundException: feign.optionals.OptionalDecoder

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mrvon2015commented, Apr 17, 2018

1.) <version>2.0.0.M2</version> can not find spring-cloud-openfeign-core, and find the spring-cloud-netflix-core 2. )because lack the jar

<dependency>
         <groupId>io.github.openfeign</groupId>
         <artifactId>feign-java8</artifactId>
 </dependency>
0reactions
henzercommented, Apr 17, 2020

Hi @keyantec, there is no need to add feign-java8 library. The OptionalDecoder class was added into feign-core since 10.0.0 version. You should update it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using spring cloud feign causes java.lang ... - Stack Overflow
But as oon as I add enableFeignClients, I got this error during compilation, java.lang.NoClassDefFoundError: feign/Logger at java.lang.
Read more >
feign.optionals.OptionalDecoder Maven / Gradle / Ivy
feign.optionals.OptionalDecoder maven / gradle build tool code. The class is part of the package ➦ Group: io.github.openfeign ➦ Artifact: feign-core ...
Read more >
Spring Cloud Feign 出现ClassNotFoundException - 博客园
Spring Cloud Feign 出现ClassNotFoundException: feign.Feign$Builder错误. ... NoClassDefFoundError: feign/Feign$Builder at java.lang.Class.
Read more >
Openfeign Classnotfoundexception - ADocLib
This page shows Java code examples of feign.gson. @param endpoint URL of Marathon @param interceptors optional request Builder builder Feign.builder.clientnew ...
Read more >
Failed to instantiate [feign.codec.Decoder]: Factory method ...
Decoder]: Factory method 'feignDecoder' threw exception; nested exception is java.lang.NoClassDefFoundError: feign/optionals/OptionalDecoder ...
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