title: Spring boot Cassandra "Error creating bean with name 'session'"
body: <p>I have problem with simple Spring Boot application. I'm using:</p>
  
  <ul>
  <li>spring-boot-starter-parent</li>
  <li>spring-boot-starter-data-cassandra</li>
  <li>Cassandra 3.11.3 (both on CentOS 7 server and local Mac OS) (query by cqlsh works)</li>
  </ul>
  
  <p>I followed simple guide from <a href="https://www.baeldung.com/spring-data-cassandra-tutorial" rel="nofollow noreferrer">https://www.baeldung.com/spring-data-cassandra-tutorial</a> and no matter if Cassandra is running or not running I 
   gets an one error while launching:</p>
  
  <pre><code>2018-11-25 09:12:34.581 ERROR 83213 --- [main] o.s.boot.SpringApplication: Application run failed
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [some/project/path/CassandraConfig.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/codahale/metrics/JmxReporte
  </code></pre>
  
  <p>My config class:</p>
  
  <pre><code>@Configuration
  @EnableCassandraRepositories(basePackages = "packagename")
  public class CassandraConfig extends AbstractCassandraConfiguration {
  
      @Override
      protected String getKeyspaceName() {
          return "test";
      }
  
      @Bean
      public CassandraClusterFactoryBean cluster() {
          CassandraClusterFactoryBean cluster = new CassandraClusterFactoryBean();
          cluster.setContactPoints("127.0.0.1");
          cluster.setPort(9042);
          return cluster;
      }
  
      @Override
      public SchemaAction getSchemaAction() {
          return SchemaAction.CREATE_IF_NOT_EXISTS;
      }
  
      @Override
      public String[] getEntityBasePackages() {
          return new String[]{"packagename"};
      }
  }
  </code></pre>
  
  <p>Entity:</p>
  
  <pre><code>@Table
  public class Image implements Serializable {
  
      @PrimaryKeyColumn(
          name = "key",
          ordinal = 0,
          type = PrimaryKeyType.PARTITIONED)
      private UUID id;
  
      @Column
      private Blob object;
  }
  </code></pre>
  
  <p>Repository:</p>
  
  <pre><code>@Repository
  public interface ImagesRepository extends CrudRepository&lt;Image, UUID&gt; {
  }
  </code></pre>
  
  <p>Cassandra structure:</p>
  
  <pre><code>CREATE TABLE images (
      key text,
      object blob,
      PRIMARY KEY (key)
  );
  </code></pre>
  
  <p>Also <a href="https://github.com/springframeworkguru/spring-boot-cassandra-example" rel="nofollow noreferrer">https://github.com/springframeworkguru/spring-boot-cassandra-example</a> gives me an error on creating the bean too. </p>