nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Lim <Keith....@ds-iq.com>
Subject Windows Nifi ExecuteSql querying Azure Sql Server using JDBC failed to load database driver.
Date Wed, 04 May 2016 23:51:33 GMT
I have a simple ExecuteSql processor that uses jdbc to connect to Microsoft Azure Sql Server.
 My DBCPConnectionPool is set as below:

Database Connection URL: jdbc:sqlserver://dsiq-dev.database.windows.net:1433;database=CDBStaging
 (I have tried with the full connection as extracted from Azure Portal:  jdbc:sqlserver://dsiq-dev.database.windows.net:1433;database=CDBStaging;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;)
Database Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver
Database Driver Jar Url: file:///C:/drivers/sqljdbc/sqljdbc_6.0/enu/sqljdbc41.jar   (I tried
sqljdbc4.jar and sqljdbc42.jar as well).

I tried all permutation of the above I can think of, and always get something like below:
Can’t load Database Driver.
My Nifi server is running on windows 10 and the driver was downloaded from here: https://www.microsoft.com/en-us/download/details.aspx?id=11774).

Thanks,
Keith

2016-05-04 16:07:57,545 ERROR [StandardProcessScheduler Thread-3] o.a.n.c.s.StandardControllerServiceNode
DBCPConnectionPool[id=63a0ccaf-fed7-4223-8c28-6d3b9ba6607e] Failed to invoke @OnEnabled method
due to org.apache.nifi.reporting.InitializationException: Can't load Database Driver
2016-05-04 16:07:57,547 ERROR [StandardProcessScheduler Thread-3] o.a.n.c.s.StandardControllerServiceNode
org.apache.nifi.reporting.InitializationException: Can't load Database Driver
                at org.apache.nifi.dbcp.DBCPConnectionPool.getDriverClassLoader(DBCPConnectionPool.java:199)
~[na:na]
                at org.apache.nifi.dbcp.DBCPConnectionPool.onConfigured(DBCPConnectionPool.java:162)
~[na:na]
                at sun.reflect.GeneratedMethodAccessor228.invoke(Unknown Source) ~[na:na]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_77]
                at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
                at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
~[na:na]
                at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
~[na:na]
                at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70)
~[na:na]
                at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47)
~[na:na]
                at org.apache.nifi.controller.service.StandardControllerServiceNode$1.run(StandardControllerServiceNode.java:285)
~[na:na]
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[na:1.8.0_77]
                at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_77]
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
[na:1.8.0_77]
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[na:1.8.0_77]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_77]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_77]
                at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
                at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_77]
                at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_77]
                at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_77]
                at java.lang.Class.forName0(Native Method) ~[na:1.8.0_77]
                at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_77]
                at org.apache.nifi.dbcp.DBCPConnectionPool.getDriverClassLoader(DBCPConnectionPool.java:188)
~[na:na]
                ... 16 common frames omitted
2016-05-04 16:07:57,547 ERROR [StandardProcessScheduler Thread-3] o.a.n.c.s.StandardControllerServiceNode
Failed to invoke @OnEnabled method of DBCPConnectionPool[id=63a0ccaf-fed7-4223-8c28-6d3b9ba6607e]
due to org.apache.nifi.reporting.InitializationException: Can't load Database Driver


Mime
View raw message