# Logstash, Mongodb and JDBC

**URL:** <https://discuss.elastic.co/t/logstash-mongodb-and-jdbc/83867>\
**Category:** Logstash\
**Created:** [April 27, 2017, 12:53pm UTC](https://discuss.elastic.co/t/logstash-mongodb-and-jdbc/83867 "2017-04-27T12:53:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdChamp](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@AdChamp](https://discuss.elastic.co/u/AdChamp)\
**Post date:** [April 27, 2017, 12:53pm UTC](https://discuss.elastic.co/t/logstash-mongodb-and-jdbc/83867/1 "2017-04-27T12:53:37Z")

</div>

Hi,

I have a problem configuring logstash. I want to be able to put in input jdbc for mongodb.  
My config :  
input{  
jdbc{  
jdbc\_driver\_library =\> "mongo-java-driver-3.2.2.jar"  
jdbc\_driver\_class =\> "com.mongodb.MongoClient"  
jdbc\_connection\_string =\> "jdbc:mongodb://localhost:27017"  
jdbc\_user =\> ""  
}  
}  
output{  
stdout{

```
}

```

}

The problem is :  
:error=\>"Java::JavaSql::SQLException: No suitable driver found for jdbc:mongodb://localhost:27017/"}

---

<div class="post-metadata">

**Author:** ![Xavy](https://avatars.discourse-cdn.com/v4/letter/x/e0b2c6/32.png) [@Xavy](https://discuss.elastic.co/u/Xavy)\
**Post date:** [April 27, 2017, 1:45pm UTC](https://discuss.elastic.co/t/logstash-mongodb-and-jdbc/83867/2 "2017-04-27T13:45:00Z")

</div>

HI Adri:

Could you try using jdbc\_driver\_class =\> "Java::com.mongodb.MongoClient" ?  
Regards

---

<div class="post-metadata">

**Author:** ![AdChamp](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@AdChamp](https://discuss.elastic.co/u/AdChamp)\
**Post date:** [April 27, 2017, 3:13pm UTC](https://discuss.elastic.co/t/logstash-mongodb-and-jdbc/83867/3 "2017-04-27T15:13:46Z")

</div>

Yes, it's the same answer.

---

<div class="post-metadata">

**Author:** ![Xavy](https://avatars.discourse-cdn.com/v4/letter/x/e0b2c6/32.png) [@Xavy](https://discuss.elastic.co/u/Xavy)\
**Post date:** [April 27, 2017, 3:33pm UTC](https://discuss.elastic.co/t/logstash-mongodb-and-jdbc/83867/4 "2017-04-27T15:33:41Z")

</div>

Hi again:

Is this driver the one from Unity?. Case it is Unity doc says that driver class is mongodb.jdbc.MongoDriver (note there is not com. prefix)

[http://www.unityjdbc.com/support/doc/full/unityjdbcdoc.html#d6e475](http://www.unityjdbc.com/support/doc/full/unityjdbcdoc.html#d6e475)

---

<div class="post-metadata">

**Author:** ![Oozza](https://avatars.discourse-cdn.com/v4/letter/o/76d3ee/32.png) [@Oozza](https://discuss.elastic.co/u/Oozza)\
**Post date:** [May 11, 2017, 1:31pm UTC](https://discuss.elastic.co/t/logstash-mongodb-and-jdbc/83867/5 "2017-05-11T13:31:13Z")

</div>

"mongo-java-driver-3.2.2.jar" is the name of the official mongodb java library. This library does not implement JDBC, so it will not work. You need to look for JDBC driver.

---

<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:** [June 8, 2017, 1:38pm UTC](https://discuss.elastic.co/t/logstash-mongodb-and-jdbc/83867/6 "2017-06-08T13:38:07Z")

</div>

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