title: Spring data elasticsearch fails to initialze the elasticsearchtemplate
body: <p>I am using spring-data-elasticsearch 2.0.0 RELEASE and ElasticSearch 2.2.0</p>
  
  <p>I have setup my beans as follows:</p>
  
  <pre><code>@Configuration    
  public class ElasticSearchClient {
          @Autowired
          private ElasticSerachConfig esConfig;
          static final String COLON = ":";
          static final String COMMA = ",";
  
          private Settings getSettings(){
                  return Settings.builder()                                
                                  .put("client.transport.sniff", esConfig.isClusterSniff())
                                  .put("client.transport.ping_timeout", esConfig.getClientPingTimeout())
                                  .put("client.transport.nodes_sampler_interval", esConfig.getClientNodesSampleInterval())
                                  .build();
          }
  
          protected Client buildClient() throws Exception {
                  TransportClient client = TransportClient.builder().settings(getSettings()).build();
  
                  for (String clusterNode : split(esConfig.getClusteNodes(), COMMA)) {
                          String hostName = substringBeforeLast(clusterNode, COLON);
                          String port = substringAfterLast(clusterNode, COLON);        
  
                          client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(hostName), Integer.valueOf(port)));
                  }
                  client.connectedNodes();
  
                  return client;
          }
  
          @Bean
          public ElasticsearchTemplate getElasticSearchTenplate() throws Exception{
                          return new ElasticsearchTemplate(buildClient());
          }
  }
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <pre><code>Caused by: java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories.repositoryBaseClass()
          at java.lang.reflect.Method.getDefaultValue(Unknown Source) ~[na:1.8.0_60]
          at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.registerDefaultValues(RecursiveAnnotationAttributesVisitor.java:69) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.doVisitEnd(RecursiveAnnotationAttributesVisitor.java:57) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.doVisitEnd(AnnotationAttributesReadingVisitor.java:67) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(RecursiveAnnotationAttributesVisitor.java:48) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.asm.ClassReader.readAnnotationValues(ClassReader.java:1802) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.asm.ClassReader.accept(ClassReader.java:642) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.asm.ClassReader.accept(ClassReader.java:508) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:64) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:98) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102) ~[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
          at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:279) ~[spring-context-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
  </code></pre>
  
  <p>I have the following in my build.gradle:</p>
  
  <pre><code>compile 'org.springframework.data:spring-data-elasticsearch:2.0.0.RELEASE'      
  compile 'org.springframework.data:spring-data-commons-core:1.4.1.RELEASE'
  </code></pre>
  
  <p>Is there anything I am missing? I am pretty much following the same example as provided in the spring-data-elasticsearch example.</p>