*Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.io.Writable*
See what its showing.. just include the jar that contains this class which is generally hadoop-core please find this jar in hadoop lib folder and add this to your project class path Regards ∞ Shashwat Shriparv On Mon, Jul 9, 2012 at 10:06 PM, Jayanth Muthya <jayanthmut...@gmail.com>wrote: > I am trying to programmatically execute hive queries using the hive JDBC > driver. I am following the example from: > https://cwiki.apache.org/Hive/hiveclient.html > And I am getting the following error: > > Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/hadoop/io/Writable > at > > org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:193) > at > org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:127) > at > > org.apache.hadoop.hive.jdbc.HiveConnection.configureConnection(HiveConnection.java:126) > at > org.apache.hadoop.hive.jdbc.HiveConnection.<init>(HiveConnection.java:121) > at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104) > at java.sql.DriverManager.getConnection(DriverManager.java:582) > at java.sql.DriverManager.getConnection(DriverManager.java:185) > at HiveJdbcClient.main(HiveJdbcClient.java:23) > Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.io.Writable > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > > Am I missing something? Should I be doing something else too? > > Thanks > Jay > -- ∞ Shashwat Shriparv