Java::oracle.jdbc.driver.OracleDriver not loaded

Hello,

since I am trying to use logstash 5 my connection to Oracle stopped to work.
On 2.1 it works perfectly with this configuration

input {
      jdbc {   jdbc_driver_library => "/home/tva/prototype/logstash-5.0.2/lib/custom-jars/ojdbc6.jar"
                    jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
                    jdbc_connection_string => "jdbc:oracle:thin:@//oracle-test.something.com:1521/KUK"
                    jdbc_user => "user"
                    jdbc_password => "user"
                    parameters => { }
                    schedule => "* * * * *"
                    statement => "select sysdate from dual"
    }
}

In log I can see following error:

[2016-12-13T13:17:36,175][ERROR][logstash.agent           ] Pipeline aborted due to error {:exception=>#<LogStash::ConfigurationError: Java::oracle.jdbc.driver.OracleDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?>, :backtrace=>["/home/tva/prototype/logstash-5.0.2/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin_mixins/jdbc.rb:157:in `prepare_jdbc_connection'", "/home/tva/prototype/logstash-5.0.2/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/inputs/jdbc.rb:191:in `register'", "/home/tva/prototype/logstash-5.0.2/logstash-core/lib/logstash/pipeline.rb:319:in `start_inputs'", "org/jruby/RubyArray.java:1613:in `each'", "/home/tva/prototype/logstash-5.0.2/logstash-core/lib/logstash/pipeline.rb:318:in `start_inputs'", "/home/tva/prototype/logstash-5.0.2/logstash-core/lib/logstash/pipeline.rb:195:in `start_workers'", "/home/tva/prototype/logstash-5.0.2/logstash-core/lib/logstash/pipeline.rb:153:in `run'", "/home/tva/prototype/logstash-5.0.2/logstash-core/lib/logstash/agent.rb:250:in `start_pipeline'"]}
[2016-12-13T13:17:36,203][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9601}

What have been changed there since 5.0?
Based on Stackoverflow and other forums it seems that I am not alone with this problem.

Can you please advise?

Thank you
Reddy

2 Likes

Problem solved by replacing ojdbc6.jar with ojdbc7.jar

1 Like

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