# JDBC input plugin error for MongoDB

**URL:** <https://discuss.elastic.co/t/jdbc-input-plugin-error-for-mongodb/113086>\
**Category:** Logstash\
**Created:** [December 23, 2017, 8:59pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-error-for-mongodb/113086 "2017-12-23T20:59:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarra\_Bouhenni](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@Sarra\_Bouhenni](https://discuss.elastic.co/u/Sarra_Bouhenni)\
**Post date:** [December 23, 2017, 8:59pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-error-for-mongodb/113086/1 "2017-12-23T20:59:31Z")

</div>

Hello,  
I am using Logstash to replcate a database from MongoDB to Elasticsearch using Logstash 6.0.0, here is my config file:

```auto
input{
    jdbc{
        jdbc_driver_library => "/usr/share/logstash/driver/mongodb-driver-3.6.1.jar"
        jdbc_driver_class => "mongodb.jdbc.MongoDriver"
        jdbc_connection_string => "jdbc:mongodb://mongo:27017/DevDb"
        jdbc_user => ""
        statement => "*"
    }
}

output {
  elasticsearch {
    hosts => 'http://user:xxxx@elasticsearch:9200'
    index => 'mongo'
 }
  stdout { codec => rubydebug }
}

```

I am using the official MongoDB java driver, downloaded from this link: [Mongo java driver](http://mongodb.github.io/mongo-java-driver/), but I'm getting the following error:

```auto
Error: mongodb.jdbc.MongoDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
Exception: LogStash::ConfigurationError

```

So what class name should I use ? Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [January 2, 2018, 12:30pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-error-for-mongodb/113086/2 "2018-01-02T12:30:59Z")

</div>

This driver `mongodb-driver-3.6.1.jar` is a Java not JDBC driver.

Maybe:  
[Progress](https://www.progress.com/jdbc/mongodb) or [UnityJDBC](http://www.unityjdbc.com/mongojdbc/mongo_jdbc.php), you may need to pay for these.

---

<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:** [January 30, 2018, 12:31pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-error-for-mongodb/113086/3 "2018-01-30T12:31:05Z")

</div>

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