Error: java.lang.ClassNotFoundException: com.dbschema.MongoJdbcDriver. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?

hi , im using dbschema mongo driver to connect to move data from mongo to logstash . but here is the error


Error: java.lang.ClassNotFoundException: com.dbschema.MongoJdbcDriver. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
elastic-search-logstash-1 | Exception: LogStash::PluginLoadingError
elastic-search-logstash-1 | Stack: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.2.2/lib/logstash/plugin_mixins/jdbc/common.rb:45:in `load_driver'

my docker compose file
version: '3.7'

services:

logstash:

image: logstash:8.0.0

ports:

  - '5000:5000'

volumes:

  - type: bind

    source: ./pipelines/

    target: /usr/share/logstash/pipeline

    read_only: true

  - type: bind

    source: ./jdbc-connector/

    target: /usr/share/logstash/jdbc-connector  

    read_only: true

  - type: bind

    source: ./MongoDbJdbcDriver/mongojdbc4.0.jar

    target: /usr/share/logstash/logstash-core/lib/jars/mongojdbc4.0.jar

    read_only: true      

  - type: bind

    source: ./logstash-config/logstash.yml

    target: /usr/share/logstash/config/logstash.yml

    read_only: true

my pipeline

input {
jdbc
{
jdbc_driver_library => "/usr/share/logstash/logstash-core/lib/jars/mongojdbc4.0.jar"
jdbc_driver_class => "com.dbschema.MongoJdbcDriver"
jdbc_user => "---"
jdbc_password => "----"
jdbc_connection_string => "-----"
statement => "db.t_ams_employee_tickets.find({ }, {'_id': false})"
}
}
filter {
mutate {
rename => { "[_id]" => "documentId" }
}
}

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