Support Questions

Find answers, ask questions, and share your expertise

Error while using NiFi flow to execute Impala: java.lang.ClassNotFoundException: com.cloudera.impala.jdbc.Driver

avatar
Explorer

Hi Team,

We have the following issue, we are using nifi work flow, in which we are trying to execute impala, before implementing nifi  execute script, we tested the script by using jython to test the feasibility of the connections we established is successful and able to get the count in impala, however when using the same connection configuration in nifi execute script processor, we get the java class path not found, the impala jdbc connection is placed in a customized location, impalajdbc41.jar file is not a nar, file, and the customized location is readable, as confirmed by the support and if placed in the nar file location will

Please find the logs for reference as an attachment.2025-09-29 15:31:08,495 ERROR org.apache.nifi.processors.script.ExecuteScript: ExecuteScript[id=49498cfb-70fc-1ebf-ffff-fffff0fa2dc8] Processing failed
org.apache.nifi.processor.exception.ProcessException: javax.script.ScriptException: java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: com.cloude
ra.impala.jdbc.Driver in <script> at line number 22
at org.apache.nifi.processors.script.ExecuteScript.onTrigger(ExecuteScript.java:247)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1361)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:247)
at org.apache.nifi.controller.scheduling.AbstractTimeBasedSchedulingAgent.lambda$doScheduleOnce$0(AbstractTimeBasedSchedulingAgent.java:59)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
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: javax.script.ScriptException: java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: com.cloudera.impala.jdbc.Driver in <script> at line n
umber 22
at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:222)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:59)
at org.python.jsr223.PyScriptEngine.access$300(PyScriptEngine.java:20)
at org.python.jsr223.PyScriptEngine$PyCompiledScript.eval(PyScriptEngine.java:250)
at javax.script.CompiledScript.eval(Unknown Source)
at org.apache.nifi.script.impl.JythonScriptRunner.run(JythonScriptRunner.java:63)
at org.apache.nifi.processors.script.ExecuteScript.onTrigger(ExecuteScript.java:230)
... 11 common frames omitted
Caused by: org.python.core.PyException: java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: com.cloudera.impala.jdbc.Driver
at org.python.core.Py.JavaError(Py.java:545)
at org.python.core.Py.JavaError(Py.java:536)

1 ACCEPTED SOLUTION

avatar
Explorer

Dear Team,

The issue is with the execute script  the way i am passing does not seem to reflect the same works in jython, which is testing the script in jython first, and then adding the script in to nifi, and same location is being used in nifi execute script processor, adding the reference of the template, and nifi applog. I already have a ticket going the same but Case#: 1132791

 

Regards

View solution in original post

4 REPLIES 4

avatar
Expert Contributor

Hello-

 

Please use this as the guidance: https://community.cloudera.com/t5/Community-Articles/Connecting-Nifi-to-Impala-using-Simba-JDBC-driv...

Let us know if you still have issues. We would then ask our NiFi experts to chime in.

avatar
Expert Contributor

hi @Zainers,

the .jar driver must be accessible on all hosts in the Nifi cluster.

the class name must match the driver version, for example:

com.cloudera.impala.jdbc.Driver
com.cloudera.impala.jdbc4.Driver
com.cloudera.impala.jdbc41.Driver

the link Boris sent has great examples of how to use and configure it.

https://community.cloudera.com/t5/Community-Articles/Connecting-Nifi-to-Impala-using-Simba-JDBC-driv... 

avatar
Explorer

Dear Team,

The issue is with the execute script  the way i am passing does not seem to reflect the same works in jython, which is testing the script in jython first, and then adding the script in to nifi, and same location is being used in nifi execute script processor, adding the reference of the template, and nifi applog. I already have a ticket going the same but Case#: 1132791

 

Regards

avatar
Expert Contributor

hi @Zainers 

perfect!

if you already have an open case with the support team, the team will get back to you shortly with a specific solution. 😉