Hi,
I am trying to connect to an Oracle database using NiFi. In the connection
pool settings, I have oracle.jdbc.driver.OracleDriver as the class name, and
the driver at C:/users/mrkk/nifi/ojdbc8.jar. When I try to enable the
connection, I get the following error:
2018-05-30 10:50:15,540 ERROR [Timer-Driven Process Thread-6]
o.a.n.c.s.StandardControllerServiceNode Failed to invoke @OnEnabled method of
DBCPConnectionPool[id=ad389466-0163-1000-3707-ead2fcf1dd3e] due to
org.apache.nifi.reporting.InitializationException: Can't load Database Driver
2018-05-30 10:50:45,542 ERROR [Timer-Driven Process Thread-5]
o.a.n.c.s.StandardControllerServiceNode
DBCPConnectionPool[id=ad389466-0163-1000-3707-ead2fcf1dd3e] Failed to invoke
@OnEnabled method due to org.apache.nifi.reporting.InitializationException:
Can't load Database Driver: {}
org.apache.nifi.reporting.InitializationException: Can't load Database Driver
at
org.apache.nifi.dbcp.DBCPConnectionPool.getDriverClassLoader(DBCPConnectionPool.java:249)
at
org.apache.nifi.dbcp.DBCPConnectionPool.onConfigured(DBCPConnectionPool.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
at
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
at
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70)
at
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47)
at
org.apache.nifi.controller.service.StandardControllerServiceNode$2.run(StandardControllerServiceNode.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown
Source)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.nifi.dbcp.DBCPConnectionPool.getDriverClassLoader(DBCPConnectionPool.java:238)
... 17 common frames omitted
2018-05-30 10:50:45,543 ERROR [Timer-Driven Process Thread-5]
o.a.n.c.s.StandardControllerServiceNode Failed to invoke @OnEnabled method of
DBCPConnectionPool[id=ad389466-0163-1000-3707-ead2fcf1dd3e] due to
org.apache.nifi.reporting.InitializationException: Can't load Database Driver
... I've tried putting the driver in the lib directory (and updating the
connection pool settings accordingly), but I get the same error each time.
I've tried changing the location syntax, but I know it's finding the driver
file, because it will say "invalid" in the State field if it can't find the
file.
Any ideas as to what I might be doing wrong, or suggestions on how to debug
further?
Thanks,
Mike
Mike Rosiak
Sr. Consultant, North America Commercial
MarkLogic Corporation
[email protected]<mailto:[email protected]>
Mobile: 215-872-5201
http://www.marklogic.com<http://www.marklogic.com/>
[MLSoMeSignature]<http://www.marklogic.com/social/>