title: Can not load jdbc driver Logstash with MariaDB
body: <p>I want to import data from mariaDB to elasticsearch using logstash
  Logstash config file: </p>
  
  <pre><code>input {
    jdbc {
      jdbc_driver_library =&gt; "/&lt;file path&gt;/mariadb-java-client-2.4.2.jar"
      jdbc_driver_class =&gt; "java::org.mariadb.jdbc.Driver"
      jdbc_connection_string =&gt; "jdbc:mariadb://&lt;database host&gt;:3306/&lt;database name&gt;"
      jdbc_user =&gt; "root"
      jdbc_password =&gt; "password"
      statement =&gt; "SELECT city_id as id, city_name as cityName FROM city_view;"
    }
  }
  output {
    elasticsearch {
      document_id=&gt; "%{id}"
      document_type =&gt; "cities"
      index =&gt; "city"
      hosts =&gt; "localhost:9200"
    }
    stdout{
    codec =&gt; rubydebug
    }
  }
  </code></pre>
  
  <p>Logstash version: <code>logstash 7.3.1</code></p>
  
  <p>Java version: <code>java 11.0.2 2019-01-15 LTS</code>
  When I run logstash with above config file(ie. logstash -f test.conf), I am getting below error</p>
  
  <pre><code>[ERROR] 2019-08-29 10:36:14.414 [[main]&lt;jdbc] jdbc - Failed to load /home/nitin/Downloads/jar_files/mariadb-java-client-2.4.2.jar {:exception=&gt;#&lt;TypeError: failed to coerce jdk.internal.loader.ClassLoaders$AppClassLoader to java.net.URLClassLoader&gt;}
  [ERROR] 2019-08-29 10:36:14.435 [[main]&lt;jdbc] javapipeline - A plugin had an unrecoverable error. Will restart this plugin.
    Pipeline_id:main
    Plugin: &lt;LogStash::Inputs::Jdbc jdbc_user=&gt;"ci_dev", jdbc_password=&gt;&lt;password&gt;, statement=&gt;"SELECT city_id as id, city_name as cityName FROM city_view;", jdbc_driver_library=&gt;"/home/nitin/Downloads/jar_files/mariadb-java-client-2.4.2.jar", jdbc_connection_string=&gt;"jdbc:mariadb://databasehost:3306/database", id=&gt;"a54ea500b9cada81163159511b3a081f1f0ef724b956e5bd2d7a66ec54dced74", jdbc_driver_class=&gt;"java::org.mariadb.jdbc.Driver", enable_metric=&gt;true, codec=&gt;&lt;LogStash::Codecs::Plain id=&gt;"plain_440926ba-65ee-47cf-964f-2328293a2085", enable_metric=&gt;true, charset=&gt;"UTF-8"&gt;, jdbc_paging_enabled=&gt;false, jdbc_page_size=&gt;100000, jdbc_validate_connection=&gt;false, jdbc_validation_timeout=&gt;3600, jdbc_pool_timeout=&gt;5, sql_log_level=&gt;"info", connection_retry_attempts=&gt;1, connection_retry_attempts_wait_time=&gt;0.5, parameters=&gt;{"sql_last_value"=&gt;1970-01-01 00:00:00 UTC}, last_run_metadata_path=&gt;"/home/nitin/.logstash_jdbc_last_run", use_column_value=&gt;false, tracking_column_type=&gt;"numeric", clean_run=&gt;false, record_last_run=&gt;true, lowercase_column_names=&gt;true&gt;
    Error: java::org.mariadb.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
    Exception: LogStash::ConfigurationError
    Stack: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:163:in `open_jdbc_connection'
  /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:221:in `execute_statement'
  /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:277:in `execute_query'
  /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:263:in `run'
  /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:309:in `inputworker'
  /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:302:in `block in start_input'
  </code></pre>