# No able to write in Elasticsearch index using Spark 2.0.0

**URL:** <https://discuss.elastic.co/t/no-able-to-write-in-elasticsearch-index-using-spark-2-0-0/58612>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [August 22, 2016, 7:28pm UTC](https://discuss.elastic.co/t/no-able-to-write-in-elasticsearch-index-using-spark-2-0-0/58612 "2016-08-22T19:28:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumit\_gupta\_sgt](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@sumit\_gupta\_sgt](https://discuss.elastic.co/u/sumit_gupta_sgt)\
**Post date:** [August 22, 2016, 7:28pm UTC](https://discuss.elastic.co/t/no-able-to-write-in-elasticsearch-index-using-spark-2-0-0/58612/1 "2016-08-22T19:28:52Z")

</div>

Hi All,

Here is my setup information  
ES version: 2.3.3  
Spark: 2.0.0  
ES-Hadoop jar: elasticsearch-hadoop-2.3.3.jar  
ES-Spark Jar: elasticsearch-spark\_2.11-2.3.3.jar

I am trying to read data from ES index and trying to perform join using Spark using and again trying to insert in Elasticsearch index.Reading data from ES is fine and join is also fine but when i am trying to insert response (basically something like this "**df.write.format("org.elasticsearch.spark.sql").option("es.resource", "combinejoin/join").save()**" )  
it is throwing error:

Here is my full Stacktrace:  
py4j.protocol.Py4JJavaError: An error occurred while calling o34.save.  
: java.lang.AbstractMethodError: org.elasticsearch.spark.sql.DefaultSource.createRelation(Lorg/apache/spark/sql/SQLContext;Lorg/apache/spark/sql/SaveMode;Lscala/collection/immutable/Map;Lorg/apache/spark/sql/Dataset;)Lorg/apache/spark/sql/sources/BaseRelation;  
at org.apache.spark.sql.execution.datasources.DataSource.write(DataSource.scala:429)  
at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:211)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:606)  
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)  
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)  
at py4j.Gateway.invoke(Gateway.java:280)  
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:128)  
at py4j.commands.CallCommand.execute(CallCommand.java:79)  
at py4j.GatewayConnection.run(GatewayConnection.java:211)  
at java.lang.Thread.run(Thread.java:745)

---

<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:** [August 23, 2016, 2:37pm UTC](https://discuss.elastic.co/t/no-able-to-write-in-elasticsearch-index-using-spark-2-0-0/58612/2 "2016-08-23T14:37:25Z")

</div>

> [@sumit\_gupta\_sgt](#):
>
> Spark: 2.0.0  
> ES-Hadoop jar: elasticsearch-hadoop-2.3.3.jar  
> ES-Spark Jar: elasticsearch-spark\_2.11-2.3.3.jar

Spark 2.0 is only supported in ES Hadoop 5.0.0-alpha5 and above.  
[https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch-spark-20\_2.10](https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch-spark-20_2.10)  
[https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch-spark-20\_2.11](https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch-spark-20_2.11)

---

<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:** [July 6, 2017, 1:23pm UTC](https://discuss.elastic.co/t/no-able-to-write-in-elasticsearch-index-using-spark-2-0-0/58612/3 "2017-07-06T13:23:34Z")

</div>


