# Logstash JDBC class cannot found

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-class-cannot-found/209807>\
**Category:** Logstash\
**Created:** [November 28, 2019, 8:13am UTC](https://discuss.elastic.co/t/logstash-jdbc-class-cannot-found/209807 "2019-11-28T08:13:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gunawan\_Kevin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gunawan_kevin/32/52040_2.png) [@Gunawan\_Kevin](https://discuss.elastic.co/u/Gunawan_Kevin)\
**Post date:** [November 28, 2019, 8:13am UTC](https://discuss.elastic.co/t/logstash-jdbc-class-cannot-found/209807/1 "2019-11-28T08:13:42Z")

</div>

Hi All,  
Can you help me to solve this problem  
I'm using  
elasticsearch-7.4.2  
kibana-7.4.2  
logstash-7.4.2  
windows 10

Error: com.mysql.cj.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc\_driver\_library?  
Exception: LogStash::PluginLoadingError  
Stack: D:/elasticsearch/logstash-7.4.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.16/lib/logstash/plugin\_mixins/jdbc/jdbc.rb:190:in `open_jdbc_connection' D:/elasticsearch/logstash-7.4.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.16/lib/logstash/plugin_mixins/jdbc/jdbc.rb:253:in `execute\_statement'  
D:/elasticsearch/logstash-7.4.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.16/lib/logstash/inputs/jdbc.rb:309:in `execute_query' D:/elasticsearch/logstash-7.4.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.16/lib/logstash/inputs/jdbc.rb:281:in `run'  
D:/elasticsearch/logstash-7.4.2/logstash-core/lib/logstash/java\_pipeline.rb:314:in `inputworker' D:/elasticsearch/logstash-7.4.2/logstash-core/lib/logstash/java_pipeline.rb:306:in `block in start\_input'  
[2019-11-28T15:08:50,858][ERROR][logstash.javapipeline][main] A plugin had an unrecoverable error. Will restart this plugin.

my conf

input{  
jdbc{  
jdbc\_driver\_library =\> "D:\elasticsearch\mysql-connector-java-8.0.18\mysql-connector-java-8.0.18.jar"  
jdbc\_driver\_class =\> "com.mysql.cj.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/sakila"  
jdbc\_user =\> "**"  
jdbc\_password =\> "**\*\*"  
statement =\> "SELECT \* FROM actor"  
}  
}  
output{  
elasticsearch{  
hosts =\> "localhost:9200"  
action =\> "index"  
index =\> "actor"  
document\_type =\> 'text'  
document\_id =\> '%{id}'  
}  
}

---

<div class="post-metadata">

**Author:** ![kpe](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@kpe](https://discuss.elastic.co/u/kpe)\
**Post date:** [December 4, 2019, 2:04pm UTC](https://discuss.elastic.co/t/logstash-jdbc-class-cannot-found/209807/2 "2019-12-04T14:04:01Z")

</div>

Hi Kevin,

I'm facing the same issue. here the fix =\> [https://github.com/logstash-plugins/logstash-input-jdbc/pull/356](https://github.com/logstash-plugins/logstash-input-jdbc/pull/356)

Regards,  
Kevin

---

<div class="post-metadata">

**Author:** ![Gunawan\_Kevin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gunawan_kevin/32/52040_2.png) [@Gunawan\_Kevin](https://discuss.elastic.co/u/Gunawan_Kevin)\
**Post date:** [December 10, 2019, 8:39am UTC](https://discuss.elastic.co/t/logstash-jdbc-class-cannot-found/209807/3 "2019-12-10T08:39:05Z")

</div>

Thank you for your suggestion kpe but didn't work  
But this problem already solved by move the jdbc to folder \logstash-core\lib\jars

---

<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 7, 2020, 8:39am UTC](https://discuss.elastic.co/t/logstash-jdbc-class-cannot-found/209807/4 "2020-01-07T08:39:12Z")

</div>

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