# MongoDB to Elasticsearch?

**URL:** <https://discuss.elastic.co/t/mongodb-to-elasticsearch/336767>\
**Category:** Logstash\
**Created:** [June 23, 2023, 11:48am UTC](https://discuss.elastic.co/t/mongodb-to-elasticsearch/336767 "2023-06-23T11:48:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [June 26, 2023, 10:25am UTC](https://discuss.elastic.co/t/mongodb-to-elasticsearch/336767/4 "2023-06-26T10:25:38Z")

</div>

Ok, the `NoClassDefFound` can sometimes be caused by a driver version mismatch or an invalid path, so I would double check the version and folder location [as per this thread](https://discuss.elastic.co/t/logstash-and-mongodb-input/297535).

Otherwise, depending on the version of Elasticsearch you are looking to ingest into I can think of a couple of other options:

1. There is a beta of the [MongoDB client connector that can be used with Python available as of 8.4](https://www.elastic.co/guide/en/enterprise-search/current/build-connector.html) that you could leverage which is available on the free tier.
2. Do you have a license for Elastic at all and running 8.5 or later? Another option would be to take a look at the [MongoDB native connector](https://www.elastic.co/guide/en/enterprise-search/current/mongodb-start.html), but it is a feature available for platinum license and above.
3. [Exec input plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-exec.html) which is discussed in [this old thread](https://discuss.elastic.co/t/logstash-and-mongodb-input/297535).

Do let us know how you get on!

---

_[View the full topic](https://discuss.elastic.co/t/mongodb-to-elasticsearch/336767)._
