# Error while using spring-data-elasticsearch : 3.1.0.M3

**URL:** <https://discuss.elastic.co/t/error-while-using-spring-data-elasticsearch-3-1-0-m3/133152>\
**Category:** Elasticsearch\
**Created:** [May 24, 2018, 1:04pm UTC](https://discuss.elastic.co/t/error-while-using-spring-data-elasticsearch-3-1-0-m3/133152 "2018-05-24T13:04:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RRSR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rrsr/32/27766_2.png) [@RRSR](https://discuss.elastic.co/u/RRSR)\
**Post date:** [May 24, 2018, 1:04pm UTC](https://discuss.elastic.co/t/error-while-using-spring-data-elasticsearch-3-1-0-m3/133152/1 "2018-05-24T13:04:41Z")

</div>

Hi,  
I'm getting an error for the `ElasticsearchRepository` using the below `pom.xml` :

```
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://maven.apache.org/POM/4.0.0"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.raj</groupId>
  <artifactId>standalone-elastic-example</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>standalone-elastic-example</name>
  <description>Demo project for Spring Boot</description>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.2.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <elasticsearch.version>6.2.2</elasticsearch.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch</artifactId>
    </dependency>
    <dependency>
      <groupId>org.elasticsearch.client</groupId>
      <artifactId>transport</artifactId>
      <version>6.2.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-web</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-elasticsearch</artifactId>
      <version>3.1.0.M3</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>repository.spring.milestone</id>
      <name>Spring Milestone Repository</name>
      <url>http://repo.spring.io/milestone</url>
    </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

</project>

```

Elasticsearch Version : 6.2.2 so spring-data-elasticsearch : 3.1.0.M3 ([Ref : Compatibility Matrix](https://github.com/spring-projects/spring-data-elasticsearch))

![Capture](https://us1.discourse-cdn.com/elastic/original/3X/f/f/ff66bd74b84252800f185e878dc14490a89c378d.JPG)

Any help is welcome 🙂

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 25, 2018, 6:39am UTC](https://discuss.elastic.co/t/error-while-using-spring-data-elasticsearch-3-1-0-m3/133152/2 "2018-05-25T06:39:44Z")

</div>

Please be patient and do not ping people not already involved in the thread. I have no experience with spring-data-elasticsearch, so will not be able to help.

---

<div class="post-metadata">

**Author:** ![RRSR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rrsr/32/27766_2.png) [@RRSR](https://discuss.elastic.co/u/RRSR)\
**Post date:** [May 25, 2018, 6:41am UTC](https://discuss.elastic.co/t/error-while-using-spring-data-elasticsearch-3-1-0-m3/133152/3 "2018-05-25T06:41:35Z")

</div>

Sure

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 22, 2018, 6:41am UTC](https://discuss.elastic.co/t/error-while-using-spring-data-elasticsearch-3-1-0-m3/133152/4 "2018-06-22T06:41:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
