# Where is default Logstash Java classpath?

**URL:** <https://discuss.elastic.co/t/where-is-default-logstash-java-classpath/171890>\
**Category:** Logstash\
**Created:** [March 12, 2019, 8:34am UTC](https://discuss.elastic.co/t/where-is-default-logstash-java-classpath/171890 "2019-03-12T08:34:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thangld](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thangld/32/82551_2.png) [@thangld](https://discuss.elastic.co/u/thangld)\
**Post date:** [March 12, 2019, 8:34am UTC](https://discuss.elastic.co/t/where-is-default-logstash-java-classpath/171890/1 "2019-03-12T08:34:47Z")

</div>

Hi,  
I'm running logstash in Docker Container.  
When I config input for logstash like this:

```auto
jdbc {
        jdbc_connection_string => "jdbc:mysql://localhost:3306/mysql?user=root"
        jdbc_driver_class => "com.mysql.jdbc.Driver"
        jdbc_user => "root"
        statement => "SELECT * from songs where artist = 'Bee'"
        add_field => {
        input_plugin => "jdbc"
        log_parser => "none"
        log_source_name => "sdfx"
        }
    }

```

It gives out this error:

```auto
  Error: com.mysql.jdbc.Driver not loaded. :jdbc_driver_library is not set, are you sure you included
                    the proper driver client libraries in your classpath?

```

Then, I add this config line:  
`jdbc_driver_library => "/etc/logstash/mysql-connector-java-5.1.36.jar"`  
And it works.

My question is how can I config jdbc right without adding that line?  
`If not provided, Plugin will look for the driver class in the Logstash Java classpath.`  
Where is Logstash Java classpath? So I can mount mysql-connector-java-5.1.36.jar file to that directory.

Thanks

---

<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:** [April 9, 2019, 8:34am UTC](https://discuss.elastic.co/t/where-is-default-logstash-java-classpath/171890/2 "2019-04-09T08:34:54Z")

</div>

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