Closed singlahitesh closed 6 years ago
Failed to load driver class Java::oracle.jdbc.driver.OracleDriver
.
Either you've given it the wrong path to the jar, or the wrong jar.
No, same config is working when running logstash extracted from jar
My config : output {
jdbc {
driver_jar_path => "/usr/share/logstash/ojdbc6.jar"
driver_class => "Java::oracle.jdbc.driver.OracleDriver"
connection_string => "
Docker image contents :
RUN mkdir /usr/share/logstash/log \ && /usr/share/logstash/bin/logstash-plugin install logstash-output-jdbc \ && /usr/share/logstash/bin/logstash-plugin update logstash-output-jdbc
Try removing the Java::
from your driver_class. That shouldn't be necessary.
Removing Java:: from driver class is working for jdbc output plugin. Surprisingly jdbc input plugin mentions to add Java:: in driver class for correct working of input plugin with ojdbc6.jar
{:exception=>java.lang.RuntimeException: Failed to load driver class Java::oracle.jdbc.driver.OracleDriver in either of HikariConfig class loader or Thread context classloader, :backtrace=>["com.zaxxer.hikari.HikariConfig.setDriverClassName(com/zaxxer/hikari/HikariConfig.java:340)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)", "RUBY.setup_and_test_pool!(/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-jdbc-5.3.0-java/lib/logstash/outputs/jdbc.rb:149)", "RUBY.register(/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-jdbc-5.3.0-java/lib/logstash/outputs/jdbc.rb:127)", "RUBY.register(/usr/share/logstash/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:9)", "RUBY.register(/usr/share/logstash/logstash-core/lib/logstash/output_delegator.rb:43)", "RUBY.register_plugin(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:290)", "RUBY.register_plugins(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:301)", "org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)", "RUBY.register_plugins(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:301)", "RUBY.start_workers(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:310)", "RUBY.run(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:235)", "RUBY.start_pipeline(/usr/share/logstash/logstash-core/lib/logstash/agent.rb:408)", "java.lang.Thread.run(java/lang/Thread.java:748)"]}