# Save Spark Dataframe into ES - Can't handle type exception

**URL:** <https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [September 17, 2015, 9:48am UTC](https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469 "2015-09-17T09:48:49Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [October 29, 2015, 1:52pm UTC](https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469/21 "2015-10-29T13:52:15Z")

</div>

Got to the bottom of it. Applied a fix in master and 2.x - will be included in the upcoming release.

---

<div class="post-metadata">

**Author:** ![eliasah](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eliasah/32/34741_2.png) [@eliasah](https://discuss.elastic.co/u/eliasah)\
**Post date:** [October 29, 2015, 2:12pm UTC](https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469/22 "2015-10-29T14:12:37Z")

</div>

You rock man, thanks! I don't know if there is a way on how to set this issue as solved nevertheless for other users who might stumble into something like this.

See you next week @Elastic{On} in Paris! 😉

---

<div class="post-metadata">

**Author:** ![Jonathan\_Spooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonathan_spooner/32/2672_2.png) [@Jonathan\_Spooner](https://discuss.elastic.co/u/Jonathan_Spooner)\
**Post date:** [March 31, 2016, 4:37pm UTC](https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469/23 "2016-03-31T16:37:51Z")

</div>

I believe I'm seeing a similar issue to this thread. Would you be able to comment on [Task exception could not be deserialized](https://discuss.elastic.co/t/task-exception-could-not-be-deserialized/45960)

---

<div class="post-metadata">

**Author:** ![Jonathan\_Spooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonathan_spooner/32/2672_2.png) [@Jonathan\_Spooner](https://discuss.elastic.co/u/Jonathan_Spooner)\
**Post date:** [April 5, 2016, 2:30am UTC](https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469/24 "2016-04-05T02:30:22Z")

</div>

Hi,

I believe my error as described below is related to this error. Would you be able to comment on this issue?

> [@Task exception could not be deserialized](https://discuss.elastic.co/t/task-exception-could-not-be-deserialized/45960):
>
> I have a Spark job that runs on my localhost but when run on EMR I'm getting a Warning for WARN ThrowableSerializationWrapper: Task exception could not be deserialized java.lang.ClassNotFoundException: org.elasticsearch.hadoop.EsHadoopException and error 16/03/31 16:32:55 ERROR TaskResultGetter: Could not deserialize TaskEndReason: ClassNotFound with classloader org.apache.spark.util.MutableURLClassLoader@216b55e2 • My Spark EMR version is 1.5.2 • I was using elasticsearch-spark\_2.10-2.2.0-…

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [April 5, 2016, 3:23pm UTC](https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469/25 "2016-04-05T15:23:52Z")

</div>

@Jonathan_Spooner I've already replied to your post. Let's continue the discussion there and not on this 5 months old thread.

---

<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:25pm UTC](https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469/26 "2017-07-06T13:25:24Z")

</div>



[Previous page](https://discuss.elastic.co/t/save-spark-dataframe-into-es-cant-handle-type-exception/29469.md?page=1)
