Oracle jdbc driver


#1

Hello. I have an issue about jdbc filter for oracle. Who knows about this issue?

filter{
    jdbc_streaming {
			jdbc_driver_library => "/usr/share/logstash/vendor/jar/jdbc/ojdbc6.jar"
			jdbc_driver_class => "java::oracle.jdbc.driver.OracleDriver"
			jdbc_connection_string => "jdbc:oracle://192.168.2.41:3306/"
	
			jdbc_user => "****"
			jdbc_password => "****"

			statement => "SELECT CID, OTC2_CID FROM TB_REN016_002 WHERE LORA_DEVID = :LoraID 
                                                     and PORT = :port AND ACTIVITY = 0 LIMIT 1;"
			parameters => {
				"LoraID" => "LoraID"
				"port" => "Port"
			}

			target => "matchingCid"	
		}
}

[ERROR] 2018-07-20 13:03:26.252 [[main]-pipeline-manager] pipeline - Error registering plugin {:pipeline_id=>"main", :plugin=>"#<LogStash::FilterDelegator:0x24febe23 @metric_events_out=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: out value:0, @metric_events_in=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: in value:0, @metric_events_time=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: duration_in_millis value:0, @id="cf38f4ec2c267be8a5f388cda5eb94dbc27fab847f35c92fa6d0c9747507e90a", @klass=LogStash::Filters::JdbcStreaming, @metric_events=#<LogStash::Instrument::NamespacedMetric:0x4bf93bd8 @metric=#<LogStash::Instrument::Metric:0x47769623 @collector=#<LogStash::Instrument::Collector:0x371b929a @agent=nil, @metric_store=#<LogStash::Instrument::MetricStore:0x66c52dfc @store=#<Concurrent::map:0x00000000000fac entries=3 default_proc=nil>, @structured_lookup_mutex=#Mutex:0x6460fd07, @fast_lookup=#<Concurrent::map:0x00000000000fb0 entries=119 default_proc=nil>>>>, @namespace_name=[:stats, :pipelines, :main, :plugins, :filters, :cf38f4ec2c267be8a5f388cda5eb94dbc27fab847f35c92fa6d0c9747507e90a, :events]>, @filter=<LogStash::Filters::JdbcStreaming jdbc_driver_library=>"/usr/share/logstash/vendor/jar/jdbc/ojdbc6.jar", jdbc_driver_class=>"java::oracle.jdbc.driver.OracleDriver", jdbc_connection_string=>"jdbc:oracle://192.168.2.41:3306/", jdbc_user=>"SWMS", jdbc_password=>, statement=>"SELECT CID, OTC2_CID FROM TB_REN016_002 WHERE LORA_DEVID = :LoraID and PORT = :port AND ACTIVITY = 0 LIMIT 1;", parameters=>{"LoraID"=>"LoraID", "port"=>"Port"}, target=>"matchingCid", id=>"cf38f4ec2c267be8a5f388cda5eb94dbc27fab847f35c92fa6d0c9747507e90a", enable_metric=>true, periodic_flush=>false, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, tag_on_failure=>["_jdbcstreamingfailure"], tag_on_default_use=>["_jdbcstreamingdefaultsused"], use_cache=>true, cache_expiration=>5.0, cache_size=>500>>", :error=>"java::oracle.jdbc.driver.OracleDriver not loaded", :thread=>"#<Thread:0x7cb06714@/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:246 run>"}
[ERROR] 2018-07-20 13:03:26.253 [[main]-pipeline-manager] pipeline - Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<Sequel::AdapterNotFound: java::oracle.jdbc.driver.OracleDriver not loaded>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/sequel-5.5.0/lib/sequel/adapters/jdbc.rb:44:in load_driver'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-jdbc_streaming-1.0.3/lib/logstash/plugin_mixins/jdbc_streaming.rb:47:inprepare_jdbc_connection'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-jdbc_streaming-1.0.3/lib/logstash/filters/jdbc_streaming.rb:194:in prepare_connected_jdbc_cache'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-jdbc_streaming-1.0.3/lib/logstash/filters/jdbc_streaming.rb:116:inregister'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:341:in register_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:352:inblock in register_plugins'", "org/jruby/RubyArray.java:1734:in each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:352:inregister_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:736:in maybe_setup_out_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:362:instart_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:289:in run'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:249:inblock in start'"], :thread=>"#<Thread:0x7cb06714@/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:246 run>"}
[ERROR] 2018-07-20 13:03:26.269 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] agent - Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: LogStash::PipelineAction::Create/pipeline_id:main, action_result: false", :backtrace=>nil}


(Guy Boertje) #2

jdbc_driver_class => "java::oracle.jdbc.driver.OracleDriver"

remove the java:: bit.


(system) closed #3

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