title: Connecting to Hive using python's Jaydebeapi
body: <p>I'm trying to connect to a hive server using jaydebeapi python lib, I'm getting an error. I'm not experienced in JAVA. What might the problem be, or how can I debug it?</p>
  
  <pre><code>./beeline-jdbc.py 
  
  CLASSPATH is :/usr/hdp/2.4.3.0-227/hadoop/conf:/usr/hdp/2.4.3.0-227/hadoop/lib/*:/usr/hdp/2.4.3.0-227/hadoop/.//*:/usr/hdp/2.4.3.0-227/hadoop-hdfs/./:/usr/hdp/2.4.3.0-227/hadoop-hdfs/lib/*:/usr/hdp/2.4.3.0-227/hadoop-hdfs/.//*:/usr/hdp/2.4.3.0-227/hadoop-yarn/lib/*:/usr/hdp/2.4.3.0-227/hadoop-yarn/.//*:/usr/hdp/2.4.3.0-227/hadoop-mapreduce/lib/*:/usr/hdp/2.4.3.0-227/hadoop-mapreduce/.//*::mysql-connector-java-5.1.37:mysql-connector-java-5.1.37-bin.jar:mysql-connector-java-5.1.37.zip:mysql-connector-java.jar:/usr/hdp/2.4.3.0-227/tez/*:/usr/hdp/2.4.3.0-227/tez/lib/*:/usr/hdp/2.4.3.0-227/tez/conf:/usr/hdp/current/hadoop-client/*:/usr/hdp/current/hive-client/lib/*:/usr/hdp/current/hadoop-client/client/*
  
  Traceback (most recent call last):
    File "./beeline-jdbc.py", line 18, in &lt;module&gt;
      , hivejar)
    File "/home/dev/lib/JayDeBeApi-1.0.0-py2.6.egg/jaydebeapi/__init__.py", line 380, in connect
      jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)
    File "/home/dev/lib/JayDeBeApi-1.0.0-py2.6.egg/jaydebeapi/__init__.py", line 199, in _jdbc_connect_jpype
      return jpype.java.sql.DriverManager.getConnection(url, *dargs)
  RuntimeError: No matching overloads found. at native/common/jp_method.cpp:117
  </code></pre>
  
  <p>An the script:</p>
  
  <pre><code>#!/usr/bin/env python
  
  import jaydebeapi
  import os
  
  principal='hive/dev15-namenode-01.example.com@example.COM'
  server='localhost'
  port=10000
  database='tsz'
  hivejar='/usr/hdp/current/hive-client/lib/hive-jdbc.jar'
  
  url=("jdbc:hive2://" + server + ":" + str(port) + "/default;principal="
      + principal + ";")
  
  print 'CLASSPATH is '+os.environ['CLASSPATH']
  
  c=jaydebeapi.connect("org.apache.hive.jdbc.HiveDriver", [ url, '', '']
      , hivejar)
  
  cursor=c.cursor()
  </code></pre>