Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 11-27-2017 04:09 PM
I use DBCPConnectionPool to connect to impala with JDBC. I've pointed to a folder containing the Impala JDBC Driver from Cloudera and all of its dependencies.
I've set the Driver Class name as:
com.cloudera.impala.jdbc41.DriverThe Connection URL looks something like that:
jdbc:impala://server:port/default;AuthMech=0;
failed to process session due to java.lang.NoClassDefFoundError: Could not initialize class com.cloudera.impala.core.ImpalaJDBCDriver: Could not initialize class com.cloudera.impala.core.ImpalaJDBCDriver
Unable to execute query select * from table_name limit 1; due to org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.cloudera.impala.jdbc41.Driver' for connect URL 'jdbc:impala://server:port/db;AuthMech=0;'. No FlowFile to route to failure: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.cloudera.impala.jdbc41.Driver' for connect URL 'jdbc:impala://server:port/db;AuthMech=0;'.
stack trace from nifi-app.log:
java.lang.NoClassDefFoundError: Could not initialize class com.cloudera.impala.core.ImpalaJDBCDriver at java.lang.Classs.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.cloudera.dsi.core.impl.DSIDriverFactory.createDriver(Unknown Source) at com.cloudera.jdbc.common.AbstractDriver.doInitialize(Unknown Source) at com.cloudera.jdbc.common.AbstractDriver.connect(Unknown Source) at org.apache.nifi.dbcp.DriverShim.connect(DriverShim.java:46) at org.apache.commons.dbcpDriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory:1556) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) at org.apache.comons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:272) at sun.reflect.Method.invoke(Method.java:498) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler:89) at com.sun.proxy.$Proxy453.getConnection(Unknown Source) at org.apache.nifi.processors.standarad.ExecuteSQL.onTrigger(ExecuteSQL.java:199) at org.apache.nifi.processor.AbsractProcessor.onTrigger(AbstractProcessor.java:27) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1119) at org.apache.nifi.controller.tasks.ContinuallyRunPRocessorTask.call(ContinuallyRunProcessorTask.java:147) org.apache.nifi.controller.tasks.ContinuallyRunPRocessorTask.call(ContinuallyRunProcessorTask.java:47) at or.apache.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndREset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPool.Executor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
I'm using NiFi 1.4.0 and I have all of the dependencies in one folder with the jdbc driver, with no sub folders.
Any thoughts?
Created 11-29-2017 11:00 AM
After restarting the servers it suddenly worked. Really strange. Thanks anyway!
Created 11-27-2017 04:21 PM
Is there anything else underneath that stack trace in nifi-app.log? There is usually a Caused By with a ClassNotFoundException or something like that.
Created 11-28-2017 08:57 AM
Unfortunately no..
Created 11-28-2017 06:37 PM
Is it possible to share your nifi-app.log on this question? Also, does this driver work from other utilities (Squirrel SQL, e.g.)?
Created 11-29-2017 11:00 AM
After restarting the servers it suddenly worked. Really strange. Thanks anyway!