Java::org.mariadb.jdbc.Driver not loaded


I am using Logstach to migrate data from mariadb to elasticSearch, but I always get this error, 'Error: Java::org.mariadb.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?'.

Here is my .conf file:

        jdbc {
                jdbc_driver_library => "mariadb-java-client-2.3.0-sources.jar"
                jdbc_driver_class => "Java::org.mariadb.jdbc.Driver"
                jdbc_connection_string => "jdbc:mariadb://$ip:$port/db_name"
                jdbc_user => "user"
                jdbc_password => "pwd"
                statement => "SELECT * FROM db_name.tb_name"
output {
        elasticsearch {
                hosts => "$ip:9200"
                index => "index_01"
                codec => rubydebug

I put the driver file 'mariadb-java-client-2.3.0-sources.jar' under the Logstash folder and the jar is not empty; I also tried the absolute address but I still got the same error. Could you tell me how to fix this issue.

Best Regards,

I replace the 'mariadb-java-client-2.3.0-sources.jar' with 'mariadb-java-client-2.3.0.jar' to fix this issue.

1 Like

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