hive/shark jdbc connection problem

Dear KNIME Users,

I'm experiencing a strange issue while trying to connect to Shark0.9.2 using hive0.11 jdbc

driver - while I can connect without any problem using squirrelsql client.

Any hints appreciated,

Marek

Error during fetching metadata from database, reason: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hive.jdbc.HiveQueryResultSet

DEBUG     Database Reader                    Execute failed: java.sql.SQLException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hive.jdbc.HiveQueryResultSet
java.sql.SQLException: java.sql.SQLException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hive.jdbc.HiveQueryResultSet
    at org.knime.core.node.port.database.DatabaseReaderConnection.initConnection(DatabaseReaderConnection.java:179)
    at org.knime.core.node.port.database.DatabaseReaderConnection.createTable(DatabaseReaderConnection.java:264)
    at org.knime.base.node.io.database.DBReaderNodeModel.execute(DBReaderNodeModel.java:110)
    at org.knime.core.node.NodeModel.execute(NodeModel.java:713)
    at org.knime.core.node.NodeModel.executeModel(NodeModel.java:556)
    at org.knime.core.node.Node.invokeNodeModelExecute(Node.java:1069)
    at org.knime.core.node.Node.execute(Node.java:924)
    at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:418)
    at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:98)
    at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:182)
    at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:113)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
    at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:238)

Hi Marek, 

This is becuase you are missing some classes requried by the driver (org.apache.hadoop.hive.jdbc.HiveQueryResultSet, in this case).  If you download Hive, and copy that class into the lib folder of your your JRE, this message should go away.  You may need a few other classes as well, but I don't have a complete list. 

Later this summer we will have a dedicated HIVE connector which will simplify this process. 

Regards,

Aaron

H Arron - no, the problem was not caused by missing jars - all were in place.

It was something more subtle I would say - both KNIME and hive-jdbc depends on commons-logging lib - there were 2 conflicting versions of it in my CLASSPATH resulting in this strange situation.

I just removed one of them and everything is working fine.

Thanks anyway!

Regards,

Marek