I am developing a node to access Phoenix tables and retrieve some data. I could successfully do this in the basic level. However, I added more jars so I can use UDF (User Defined Function) in Phoenix. The UDF functions works locally without any issue. I wanted to include the UDF in my development node so I can use it from Knime. I have added the required jars (as I did locally) in the plugin.xml (runtime). However, when I execute the developed node I got those errors:
Something bad happens when the class org.apache.phoenix.jdbc.PhoenixDriver is being initialized. The reason should be part of the full stack trace. You can also debug the class loading and find the cause.
This is the full stack which as I said locally have no issue:
ERROR Phoenix_udf 0:1 Execute failed: ("ExceptionInInitializerError"): null
DEBUG Phoenix_udf 0:1 Execute failed: ("ExceptionInInitializerError"): null
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at xxx.Phoenix_udf.DatabaseConnection.connectPhoenix(DatabaseConnection.java:19)
at xxx.Phoenix_udf.Phoenix_udfNodeModel.execute(Phoenix_udfNodeModel.java:97)
at org.knime.core.node.NodeModel.execute(NodeModel.java:732)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:566)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1128)
at org.knime.core.node.Node.execute(Node.java:915)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:561)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable.
at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:804)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.<clinit>(PhoenixEmbeddedDriver.java:67)
........
Why such error and only when I run from Knime?
'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable.