# Elasticsearch spark runtime dependencies

**URL:** <https://discuss.elastic.co/t/elasticsearch-spark-runtime-dependencies/344341>\
**Category:** Elasticsearch\
**Tags:** es-hadoop, runtime-fields\
**Created:** [October 3, 2023, 7:15pm UTC](https://discuss.elastic.co/t/elasticsearch-spark-runtime-dependencies/344341 "2023-10-03T19:15:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krezno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krezno/32/97090_2.png) [@krezno](https://discuss.elastic.co/u/krezno)\
**Post date:** [October 3, 2023, 7:15pm UTC](https://discuss.elastic.co/t/elasticsearch-spark-runtime-dependencies/344341/1 "2023-10-03T19:15:50Z")

</div>

Hello,

I have sucessfuly managed to use elasticsearch-spark with both pyspark and scala spark by simply adding the jar to the classpath. I have noticed that the jar has some runtime dependencies such as protobuf-java and jaxb-api. I am afraid that because I am not explicitly adding these dependencies that something subtle might break and cause unexpected results.

My question is whether it is safe to simply use the jar with elasticsearch spark without adding additional jars or are there side effects to consider? What do these dependencies add to the library? thanks

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [October 4, 2023, 1:00pm UTC](https://discuss.elastic.co/t/elasticsearch-spark-runtime-dependencies/344341/2 "2023-10-04T13:00:22Z")

</div>

Hi @krezno. I have not double-checked, but I believe that your spark classpath will already be pulling in those dependencies. Is that not the case? I have never had to explicitly add them.

---

<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:** [November 1, 2023, 1:01pm UTC](https://discuss.elastic.co/t/elasticsearch-spark-runtime-dependencies/344341/3 "2023-11-01T13:01:20Z")

</div>

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