Uploaded image for project: 'Spring Data Elasticsearch'
  1. Spring Data Elasticsearch
  2. DATAES-435

Report version mismatch if used with older ElasticSearch version

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.1 M1 (Lovelace)
    • Fix Version/s: 4.0 RC1 (Neumann)
    • Component/s: None
    • Labels:
      None
    • Environment:
      Spring Boot 2.x

      Description

      We should report a proper message (e.g. within the configuration extension) to warn if Spring Data is used with an older Elasticsearch version. Currently, we run into exceptions (see Spring Data Examples)

      java.lang.IllegalStateException: Failed to load ApplicationContext
      Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'applicationConfiguration': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'conferenceRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.execute()Lorg/elasticsearch/action/ActionFuture;
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'conferenceRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.execute()Lorg/elasticsearch/action/ActionFuture;
      Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.execute()Lorg/elasticsearch/action/ActionFuture;
      Caused by: java.lang.NoSuchMethodError: org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.execute()Lorg/elasticsearch/action/ActionFuture;
      [ERROR] textSearch(example.springdata.elasticsearch.conference.ElasticsearchOperationsTest)  Time elapsed: 0.001 s  <<< ERROR!
      java.lang.IllegalStateException: Failed to load ApplicationContext
      Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'applicationConfiguration': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'conferenceRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.execute()Lorg/elasticsearch/action/ActionFuture;
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'conferenceRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.execute()Lorg/elasticsearch/action/ActionFuture;
      Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.execute()Lorg/elasticsearch/action/ActionFuture;
      Caused by: java.lang.NoSuchMethodError: org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.execute()Lorg/elasticsearch/action/ActionFuture;
      

        Attachments

          Activity

            People

            Assignee:
            sothawo sothawo
            Reporter:
            mp911de Mark Paluch
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: