# Logstash: jdbc input plugin with MongoDb

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-input-plugin-with-mongodb/135866>\
**Category:** Logstash\
**Created:** [June 14, 2018, 8:01am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-with-mongodb/135866 "2018-06-14T08:01:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KamalHr](https://avatars.discourse-cdn.com/v4/letter/k/b38774/32.png) [@KamalHr](https://discuss.elastic.co/u/KamalHr)\
**Post date:** [June 14, 2018, 8:01am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-with-mongodb/135866/1 "2018-06-14T08:01:58Z")

</div>

I'm trying to configure a pipeline between MongoDb and Elasticsearch using logstash and the jdbc input plugin.

I tried to use Unity Mongo Jdbc driver, and dbschema's driver but nothing works, and I got the error:

```
Sequel::DatabaseConnectionError
2022 Java::JavaSql::SQLException: No suitable driver found for 
jdbc:mongodb://localhost:27017/database
2022       
java.sql.DriverManager.getConnection(java/sql/DriverManager.java:689)
2022       
java.sql.DriverManager.getConnection(java/sql/DriverManager.java:270)
2022 java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
2022       
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling 
(org/jruby/javasupport/JavaMethod.java:423)

```

My configuration file is

```
input {
  jdbc {
    jdbc_driver_library => 
      "C:\Users\user\Desktop\mongojdbc1.2.jar, 
       C:\Users\user\Desktop\mongo- 
    java-driver-3.6.3.jar"
    jdbc_driver_class => "com.dbschema.MongoJdbcDriver"
    jdbc_connection_string => "jdbc:mongodb://localhost:27017/database"
    jdbc_user => "admin"
    schedule => "*/1 * * * *"
    statement => "SELECT * FROM dossier"
   }
}

output {
    stdout { codec => rubydebug }
}

```

Btw, I tried also with the Unity full Driver, and with combining both drivers above, but with no luck.

---

<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 12, 2018, 8:01am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-with-mongodb/135866/2 "2018-07-12T08:01:58Z")

</div>

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