Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NIFI Oracle database connection Cannot load JDBC driver class

avatar
New Contributor

I am newbie to NIFI, trying to setup a connection to Oracle.I did setup a controller service with the following configuration.

Database Connection URL -> jdbc:oracle:thin:@servername:1521:SID

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

Database User -> Username

Password -> Password

I copied the oracle driver (ojdbc6.jar) to the library folder which is being referred by nifi.properties file. However when I enable the controller service I receive the following error message as per nifi-app.log file.

2016-05-30 16:30:56,844 ERROR [Timer-Driven Process Thread-7] o.a.nifi.processors.standard.ExecuteSQL ExecuteSQL[id=0fde02ca-e537-4d90-9cd4-ce94249a072d] Unable to execute SQL select query select * from c_aprdrg due to org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'. No FlowFile to route to failure: org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver' 2016-05-30 16:30:56,846 ERROR [Timer-Driven Process Thread-7] o.a.nifi.processors.standard.ExecuteSQL org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver' at org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:225) ~[na:na] at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] at org.apache.nifi.controller.service.StandardControllerServiceProvider$1.invoke(StandardControllerServiceProvider.java:164) ~[na:na] at com.sun.proxy.$Proxy122.getConnection(Unknown Source) ~[na:na] at org.apache.nifi.processors.standard.ExecuteSQL.onTrigger(ExecuteSQL.java:145) ~[nifi-standard-processors-0.6.0.1.2.0.0-91.jar:0.6.0.1.2.0.0-91] at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-0.6.0.1.2.0.0-91.jar:0.6.0.1.2.0.0-91] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1059) [nifi-framework-core-0.6.0.1.2.0.0-91.jar:0.6.0.1.2.0.0-91] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-0.6.0.1.2.0.0-91.jar:0.6.0.1.2.0.0-91] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-0.6.0.1.2.0.0-91.jar:0.6.0.1.2.0.0-91]

Any help on this would be great!.. Thanks

1 ACCEPTED SOLUTION

avatar

Hi @Suresh Sampangiraman

Once you added the jar file to the library folder, did you stop/start the Nifi JVM?

View solution in original post

3 REPLIES 3

avatar

Hi @Suresh Sampangiraman

Once you added the jar file to the library folder, did you stop/start the Nifi JVM?

avatar
New Contributor

Thanks @Ryan! Restarting the services did fix the issue. Also perhaps the jar file needs to be in all of the nodes.

avatar
New Contributor

Hey @Suresh Sampangiraman : I am facing exact similar issue with NiFi trying to connect Vertica database, I am new to NiFi and trying to figure out what processors would be best for my situation. Please provide me your email or something, it will be of great help