Error registering plugin for logstash output jdbc

Hi ,
I am trying to pull data from file and send the result to JDBC oracle , i installed the plugin logstash-output-jdbc succefully but when i run the conf file i am getting the following error :

[2019-03-13T15:02:34,812][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-03-13T15:02:34,833][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.5.4"}
[2019-03-13T15:02:42,637][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>10, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}

[2019-03-13T15:02:42,666][INFO ][logstash.outputs.jdbc ] JDBC - Starting up
[2019-03-13T15:02:42,713][ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"#LogStash::OutputDelegator:0x4e20ad95",
:error=>"missing class name (com.zaxxer.hikari.HikariDataSource')", :thread=>"#<Thread:0x2b62d639 run>"} [2019-03-13T15:02:42,720][ERROR][logstash.pipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<NameError: missing class name (com.zaxxer.hikari.HikariDataSource')>,
:backtrace=>["org/jruby/javasupport/JavaPackage.java:127:in const_missing'", "D:/ELK-6.5.4/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-output-jdbc-5.4.0/lib/logstash/outputs/jdbc.rb:146:insetup_and_test_pool!'",
"D:/ELK-6.5.4/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-output-jdbc-5.4.0/lib/logstash/outputs/jdbc.rb:127:in register'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:102:inregister'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:46:in register'", "D:/ELK-6.5.4/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:242:inregister_plugin'",
"D:/ELK-6.5.4/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:253:in block inregister_plugins'", "org/jruby/RubyArray.java:1734:ineach'", "D:/ELK-6.5.4/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:253:in register_plugins'", "D:/ELK-6.5.4/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:594:inmaybe_setup_out_plugins'",
"D:/ELK-6.5.4/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:263:in start_workers'", "D:/ELK-6.5.4/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:200:inrun'",
"D:/ELK-6.5.4/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:160:in `block in start'"],
:thread=>"#<Thread:0x2b62d639 run>"}
[2019-03-13T15:02:42,741][ERROR][logstash.agent ] Failed to execute action {:id=>:main,
:action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute
action: PipelineAction::Create, action_result: false", :backtrace=>nil}

I assume that you're using @theangryangel's logstash-output-jdbc plugin?

If so, I think that the error message indicates that the driver_class you have specified com.zaxxer.hikari.HikariDataSource' cannot be found on your classpath.

Is the trailing single-quote in that value intentional?

Yes I am using that plugin !

In the output cmd the quote exist :

This is my conf output :

output {
jdbc {
driver_jar_path => "D:\ELK-6.5.4\logstash-6.5.4\vendor\jar\jdbc\ojdbc8.jar"
driver_class => "Java::oracle.jdbc.driver.OracleDriver"
connection_string => "jdbc:oracle:thin:@host:1521/service"
username => "User_REPORT"
password => "userpass"
statement => ["INSERT INTO WEBSERVICELOGSFRPROD (ID_INDEX, SCORE, SOURCE, VAL3, STH, VAL2, VAL1, MESSAGE, TYPE, CLIENT2, PATH, TIMESTAMP, FIRSTIP, VERSION, HOST, CLIENT, HTTP, STH3, USERR, STH2) VALUES('1', '1', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)","%{val3}", "%{sth}","%{val2}", "%{val1}","%{message}", "%{type}", "%{client2}" , "%{path}" , "@timestamp" , "%{firstip}" , "@version" , "%{host}" , "%{client}" , "%{http}" , "%{sth3}" , "%{user}" , "%{sth2}" ]
}

stdout { }
}

How did you install the above plugin? It appears to be having trouble loading one of its dependencies, but it has specific instructions for installation here: https://github.com/theangryangel/logstash-output-jdbc/blob/master/README.md#installation

Thank you , it works ! :slight_smile:
I reinstalled the plugin gem file from this URL https://rubygems.org/gems/logstash-output-jdbc/versions/5.4.0

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