# Class org.elasticsearch.spark.sql.SparkSQLCompatibilityLevel not found

**URL:** <https://discuss.elastic.co/t/class-org-elasticsearch-spark-sql-sparksqlcompatibilitylevel-not-found/76857>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [February 28, 2017, 7:42pm UTC](https://discuss.elastic.co/t/class-org-elasticsearch-spark-sql-sparksqlcompatibilitylevel-not-found/76857 "2017-02-28T19:42:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [February 28, 2017, 7:42pm UTC](https://discuss.elastic.co/t/class-org-elasticsearch-spark-sql-sparksqlcompatibilitylevel-not-found/76857/1 "2017-02-28T19:42:51Z")

</div>

Playing with es4Hadoop 5.2.1 and Spark, I built a Java application with Maven deps:

```
<dependencies>
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-core_2.10</artifactId>
        <version>1.6.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-sql_2.10 -->
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-sql_2.10</artifactId>
        <version>1.6.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch-hadoop -->
    <dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch-spark-13_2.10</artifactId>
        <version>5.2.1</version>
    </dependency>

</dependencies>

```

Then when I run it (spark-submit --master local) against spark 1.6.2 on a MacBook:

> Caused by: org.elasticsearch.hadoop.EsHadoopIllegalStateException: Cannot load class [org.elasticsearch.spark.sql.SparkSQLCompatibilityLevel]

- ES library is built inside the Jar
- The same project works fine with elasticsearch-hadoop:2.4.4 instead

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [March 12, 2017, 8:31pm UTC](https://discuss.elastic.co/t/class-org-elasticsearch-spark-sql-sparksqlcompatibilitylevel-not-found/76857/2 "2017-03-12T20:31:21Z")

</div>

@ebuildy This class was added during the 5.0 release. Do any other versions of 5.x malfunction for you, or just this one?

---

<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:** [April 9, 2017, 8:31pm UTC](https://discuss.elastic.co/t/class-org-elasticsearch-spark-sql-sparksqlcompatibilitylevel-not-found/76857/3 "2017-04-09T20:31:41Z")

</div>

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