# java.lang.ClassNotFoundException: org.apache.spark.Partition$class

**URL:** <https://discuss.elastic.co/t/java-lang-classnotfoundexception-org-apache-spark-partition-class/222588>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [March 8, 2020, 8:00am UTC](https://discuss.elastic.co/t/java-lang-classnotfoundexception-org-apache-spark-partition-class/222588 "2020-03-08T08:00:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zeeshan\_Haider](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zeeshan_haider/32/64022_2.png) [@Zeeshan\_Haider](https://discuss.elastic.co/u/Zeeshan_Haider)\
**Post date:** [March 8, 2020, 8:00am UTC](https://discuss.elastic.co/t/java-lang-classnotfoundexception-org-apache-spark-partition-class/222588/1 "2020-03-08T08:00:03Z")

</div>

I have been trying to access or read Elasticsearch data into an RDD using code below

```auto
val es_rdd = sc.esRDD("spark/docs", "?q=me*") 
     println(es_rdd.first())

```

but I recieved an error which is mentioned in the title. Am I missing something here just to access data of a simple index and by the way my elasticsearch spark configutrations are these

```auto
spark.es.nodes: 127.0.0.1
spark.es.port: "9200"
spark.es.http.timeout: 5m
spark.es.scroll.size: "50"
spark.es.resource: "spark/docs"
spark.es.resource.read: "spark/docs"
spark.es.resource.write: writestoday
spark.es.index.read.missing.as.empty: "true"
spark.es.query: "?q=costinl"
spark.es.nodes.wan.only: "true"
spark.es.index.auto.create: "true"
spark.es.net.ssl: "false"

```

Write is working perfectly.

---

<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 5, 2020, 8:00am UTC](https://discuss.elastic.co/t/java-lang-classnotfoundexception-org-apache-spark-partition-class/222588/2 "2020-04-05T08:00:11Z")

</div>

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