# Java::oracle.jdbc.driver.OracleDriver not loaded in logstash-7.2.0

**URL:** https://discuss.elastic.co/t/java-oracle-jdbc-driver-oracledriver-not-loaded-in-logstash-7-2-0/213522
**Category:** Logstash
**Created:** [January 2, 2020, 7:22am UTC](https://discuss.elastic.co/t/java-oracle-jdbc-driver-oracledriver-not-loaded-in-logstash-7-2-0/213522 "2020-01-02T07:22:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Pramod\_Thakur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pramod_thakur/32/48428_2.png) [@Pramod\_Thakur](https://discuss.elastic.co/u/Pramod_Thakur)
#### Post date: [January 2, 2020, 7:22am UTC](https://discuss.elastic.co/t/java-oracle-jdbc-driver-oracledriver-not-loaded-in-logstash-7-2-0/213522/1 "2020-01-02T07:22:43Z")

</div>

Hi,

I am using logstash-7.2.0. I want to export data from oracle to ES. I am having following configuration.

```
input {
jdbc{
 jdbc_driver_library => "C:/Pramod/rnd/ElasticSearch/logstash-7.2.0/ojdbc7.jar"
 jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
 jdbc_connection_string => "jdbc:oracle:thin:@//myOracleConnectionString:1521/GSEM4GE"
 jdbc_user => "APPS_GLOBAL"
 jdbc_password => "mypassword"
 statement => "SELECT * FROM all_tables"
 # schedule => "* * * * * * *"
 # where last_analysed>:sql_last_value
 # sql_last_value is for last updated value
}

```

}  
output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
index =\> "oracleinde"  
}  
stdout{  
codec =\> rubydebug  
}  
}

when i am trying to execute this config file on command prompt it says "Java::oracle.jdbc.driver.OracleDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc\_driver\_library?".

Error: Java::oracle.jdbc.driver.OracleDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc\_driver\_library?  
Exception: LogStash::ConfigurationError  
Stack: C:/Pramod/rnd/ElasticSearch/logstash-7.2.0/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' C:/Pramod/rnd/ElasticSearch/logstash-7.2.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:221:in `execute\_statement'  
C:/Pramod/rnd/ElasticSearch/logstash-7.2.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:277:in `execute_query' C:/Pramod/rnd/ElasticSearch/logstash-7.2.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:263:in `run'  
C:/Pramod/rnd/ElasticSearch/logstash-7.2.0/logstash-core/lib/logstash/java\_pipeline.rb:309:in `inputworker' C:/Pramod/rnd/ElasticSearch/logstash-7.2.0/logstash-core/lib/logstash/java_pipeline.rb:302:in `block in start\_input'

Pls help.

---

<div class="post-metadata">

### Author: ![Pramod\_Thakur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pramod_thakur/32/48428_2.png) [@Pramod\_Thakur](https://discuss.elastic.co/u/Pramod_Thakur)
#### Post date: [January 2, 2020, 4:02pm UTC](https://discuss.elastic.co/t/java-oracle-jdbc-driver-oracledriver-not-loaded-in-logstash-7-2-0/213522/2 "2020-01-02T16:02:08Z")

</div>

I made some changes to the conf file. I kept jdbc\_driver\_library empty and put ojdbc7.jar file on /logstash-core/lib/jars/

input { jdbc{ jdbc\_driver\_library =\> "" jdbc\_driver\_class =\> "Java::oracle.jdbc.driver.OracleDriver" jdbc\_connection\_string =\> "jdbc:oracle:thin:@//myOracleConnectionString:1521/GSEM4GE" jdbc\_user =\> "APPS\_GLOBAL" jdbc\_password =\> "mypassword" statement =\> "SELECT \* FROM all\_tables" } } output { elasticsearch { hosts =\> ["[http://localhost:9200](http://localhost:9200)"] index =\> "oracleindex" } stdout{ codec =\> rubydebug } }

This works for me.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 30, 2020, 4:02pm UTC](https://discuss.elastic.co/t/java-oracle-jdbc-driver-oracledriver-not-loaded-in-logstash-7-2-0/213522/3 "2020-01-30T16:02:11Z")

</div>

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