Hello all, I have been trying to use the jdbc input plugin for logstash but keep getting a driver not loaded error. Specifically, I am using logstash-2.0.0 and the oracle jdbc jar (ojdbc6.jar). I have seen similar issues on Github (e.g. https://github.com/logstash-plugins/logstash-input-jdbc/issues/43) relating to specifying the name of the driver class correctly, but I am using the name explicitly specified in the documentation ( https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#plugins-inputs-jdbc-jdbc_driver_class). The exact error I'm getting is "Error: Java::oracle.jdbc.driver.OracleDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?". My config file (had to scrub some connection details) is:
Hi , I am getting exactly the same error
" Error: java::oracle.jdbc.driver.OracleDriver not loaded. Are you sure you've inc luded the correct jdbc driver in :jdbc_driver_library? You may be interested in the '--configtest' flag which you can use to validate logstash's configuration before you choose to restart a running system.
"
but didn't worked after re-downloading the jar. I am using logstash-2.1.0. Configuration test is OK
Below is my config
Hey Anish, could you try unzipping the JAR and and viewing the files inside? The problem I had was that when I downloaded the JAR file from the command line onto to my virtual machine, the JAR file was actually empty because Oracle requires a username and password (it was very confusing because the download appeared to go smoothly, but when I unzipped the JAR, after trying many other things, it was empty). I ended up downloading the JAR using my web browser on my local machine, unzipping the JAR to make sure it was not empty, and then copying the JAR onto my virtual machine. Since then everything has worked perfectly.
Hey Anish, the only other suggestion I have is to try capitalizing the J in Java in the connection string. So "java::oracle.jdbc.driver.OracleDriver" becomes "Java::oracle.jdbc.driver.OracleDriver". Good Luck!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.