Support Questions
Find answers, ask questions, and share your expertise

Cannot Connect to Oracle DB Using JDBC Driver

Cannot Connect to Oracle DB Using JDBC Driver

New Contributor

I cannot get an Oracle 12c database to connect to a Nifi version 1.8.0 DBCPConnectionPool controller service.  I keep receiving the following error:  

14:35:21 EDT  ERROR
bcb231c2-5cd3-1fa4-5a3f-8812d492ce5a
QueryDatabaseTable[id=bcb231c2-5cd3-1fa4-5a3f-8812d492ce5a] Unable to execute SQL select query SELECT * FROM HR.COUNTRIES due to java.sql.SQLException: Cannot create JDBC driver of class 'oracle.jdbc.driver.OracleDriver' for connect URL ' jdbc:oracle:thin:@localhost:1521:orcl': org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: Cannot create JDBC driver of class 'oracle.jdbc.driver.OracleDriver' for connect URL ' jdbc:oracle:thin:@localhost:1521:orcl'

 

I am using the standard instance with the database named 'orcl'.  With the sample user called 'hr'.  

My settings in the main property settings for the  DBCPConnectionPool service are as follows:

 

Database Connection URL -   jdbc:oracle:thin:@localhost:1521:orcl

Database Driver Class Name -  oracle.jdbc.driver.OracleDriver

Database Driver Location - C:\app\OracleHomeUser1\product\12.1.0\dbhome_1\jdbc\lib\ojdbc7.jar

 

Do  I need a newer .jar file?  Is my driver class name correct?  Is my url okay?

 

I was able to enable the controller service for this, but when I go to the NiFi canvas and try to use the service in a QueryDatabaseTable processor, I receive the error mentioned above.  Any help with this issue would be greatly appreciated.