title: JDBC Connection to Hive version 0.14.0 and from R via RDBC package
body: <p>I am having hiveserver running on a machine1</p>
  
  <p>Following code I have used for JDBC connection</p>
  
  <pre><code>hive_jars &lt;- list.files("/home/jar/hive_jdbc_jar/", 
                 pattern = "[.]jar", full.names=FALSE, recursive=TRUE)
  
  lib_dir &lt;- "/home/jar/hive_jdbc_jar/"
  
  hive_class_path &lt;- sprintf( '%s/%s', lib_dir, hive_jars )
  
  .jinit(classpath=hive_class_path, parameters="-DrJava.debug=true")
  
  hostname &lt;- "10.140.224.64"
  port &lt;- "10000"
  drv &lt;- JDBC( 'org.apache.hadoop.hive.jdbc.HiveDriver',  classPath= hive_class_path, "`" )
  server &lt;- sprintf( 'jdbc:hive://%s:%s/default', hostname, port )
  hiveconnection &lt;- dbConnect( drv, server )
  </code></pre>
  
  <p>Error I am getting</p>
  
  <pre><code>Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect",    as.character(url)[1],  : 
  java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hive.conf.HiveConf$ConfVars
  </code></pre>
  
  <p>jars i have added</p>
  
  <pre><code>  "antlr-2.7.7.jar" 
    "antlr-runtime-3.4.jar"           "commons-logging-1.1.3.jar"      
    "derby-10.10.1.1.jar"             "hadoop-common-2.4.1.jar"         "hive-exec-0.14.0.jar"           
   "hive-jdbc-0.14.0-standalone.jar" "hive-jdbc-0.14.0.jar"            "hive-metastore-0.14.0.jar"      
  "hive-service-0.14.0.jar"         "jdo-api-3.0.1.jar"               "libfb303-0.9.0.jar"             
  "libthrift-0.9.0.jar"             "log4j-1.2.16.jar"                "slf4j-api-1.7.5.jar"            
  "slf4j-log4j12-1.7.5.jar"
  </code></pre>
  
  <p><a href="https://cwiki.apache.org/confluence/display/Hive/HiveClient" rel="nofollow">https://cwiki.apache.org/confluence/display/Hive/HiveClient</a></p>