title: Using spring cloud feign causes java.lang.NoClassDefFoundError: feign/Logger
body: <p>I enabled my spring cloud for feignClients like this:</p>
  
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @RestController
  @EnableEurekaClient
  @EnableCircuitBreaker
  @EnableFeignClients
  
  public class SpringCloudConfigClientApplication {
  }
  </code></pre>
  
  <p>But as oon as I add enableFeignClients, I got this error during compilation,</p>
  
  <pre><code>java.lang.NoClassDefFoundError: feign/Logger
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2688)
      at java.lang.Class.getDeclaredMethods(Class.java:1962)
  </code></pre>
  
  <p>My POM is </p>
  
  <pre><code>&lt;parent&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;start-class&gt;demo.SpringCloudConfigClientApplication&lt;/start-class&gt;
          &lt;java.version&gt;1.7&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-eureka&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-config-server&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-hystrix&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  </code></pre>
  
  <p>In order to resolve feign logger issue, what other dependency do I need to add to the POM?</p>
  
  <p>Thanks</p>
  
  <p>Thank you @spencergibb, based on your suggestion, it worked after I change my pom. Now I have another issue for using FeignClient. Please see below:</p>
  
  <pre><code>@Autowired
      StoreClient storeClient;
      @RequestMapping("/stores")
      public List&lt;Store&gt; stores() {
          return storeClient.getStores();
      }
  </code></pre>
  
  <p>and interface is:</p>
  
  <pre><code>@FeignClient("store")
  public interface StoreClient {
      @RequestMapping(method = RequestMethod.GET, value = "/stores")
      List&lt;Store&gt; getStores();
  }
  </code></pre>
  
  <p>The store entity is:</p>
  
  <pre><code>public class Store {
  
      private long id;
      private String name;
      private String zip;
  
      public Store(long id, String name, String zip) {
          this.id = id;
          this.name = name;
          this.zip = zip;
      }
  }
  </code></pre>
  
  <p>Now when I retrieve in URL, I got this error, </p>
  
  <pre><code>ue Jun 09 15:30:10 PDT 2015
  There was an unexpected error (type=Internal Server Error, status=500).
  Could not read JSON: No suitable constructor found for type [simple type, class demo.entity.Store]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.PushbackInputStream@7db6c3dc; line: 1, column: 3] (through reference chain: java.util.ArrayList[0]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class demo.entity.Store]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.PushbackInputStream@7db6c3dc; line: 1, column: 3] (through reference chain: java.util.ArrayList[0])
  </code></pre>
  
  <p><strong>Seemed the error here is retrieved list can not be converted to store class.</strong> 
  So in order to use FeignClient, any other mapper we need to include to convert JSON into objects?</p>
  
  <p>Thanks</p>