0

I have below logstash.conf which connects to SAP HANA DB

input {
    jdbc{
         jdbc_connection_string => "jdbc:sap://<host>:<port>"
         jdbc_driver_library => "/app/tomcat/jdbc_lib/ngdbc-2.4.61.jar"
         jdbc_driver_class => "com.sap.db.jdbc.Driver"
         jdbc_user => "xxx"
         jdbc_password => "xxx"
         statement => "SELECT coumn1 FROM table1 "
         use_column_value => true
         tracking_column => "NOMINEE_ID"
         tracking_column_type => numeric

    }
}

But when I starting logstash.conf, below error occurs. Does anyone have idea?

[2019-10-15T13:15:48,683][ERROR][logstash.javapipeline    ] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"xxx", use_column_value=>true, tracking_column=>"NOMINEE_ID", jdbc_password=><password>, statement=>"SELECT NOMINEE_ID, NOMINATION_ID, NOMINEE_USER_ID, READINESS, CREATED_DATE, CREATED_BY FROM SFBIZX3_TALSHELLEYH.SM_NOMINEE", tracking_column_type=>"numeric", jdbc_driver_library=>"/app/tomcat/jdbc_lib/ngdbc-2.4.61.jar", jdbc_connection_string=>"jdbc:sap://<host>:<port>", id=>"4a9ee1ee41b1f9376ca7e0c2d199233d62c0e09cd555272d527de0745ee102c8", jdbc_driver_class=>"com.sap.db.jdbc.Driver", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_212f3f66-0328-42f0-87e0-7b078904b8e9", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, parameters=>{"sql_last_value"=>0}, last_run_metadata_path=>"C:\\Users\\I073341/.logstash_jdbc_last_run", clean_run=>false, record_last_run=>true, lowercase_column_names=>true>
  Error: com.sap.db.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
  Exception: LogStash::ConfigurationError
  Stack: C:/elkstack/logstash-7.0.1/logstash-7.0.1/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'
peace
  • 299
  • 2
  • 16
  • There's too little detail information in the error message to tell why the driver class wasn't loaded. Can you increase the verbosity for the error logging or is there another more detailed log file available? – Lars Br. Oct 23 '19 at 22:39
  • @LarsBr. Thank you for the reply. I have resolved this issue by adding the driver jar file to /logstash-core/lib/jars/ – peace Nov 22 '19 at 01:49
  • Great that you found the cause for the issue. You could write an answer to your question. – Lars Br. Nov 22 '19 at 03:25

0 Answers0