title: how to connect hive in secure mode(kerberos+ssl) using JDBC?
body: <p>I need to connect hive(kerberos + SSL) using jdbc, i tried this code but getting error like :  </p>
  
  <p>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/util/VersionInfo
          at org.apache.hadoop.hive.shims.ShimLoader.getMajorVersion(ShimLoader.java:155)
          at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:134)
          at org.apache.hadoop.hive.shims.ShimLoader.getHadoopThriftAuthBridge(ShimLoader.java:120)
          at org.apache.hive.service.auth.HttpAuthUtils.getKerberosServiceTicket(HttpAuthUtils.java:52)
          at org.apache.hive.jdbc.HttpKerberosRequestInterceptor.process(HttpKerberosRequestInterceptor.java:63)
          at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:109)
          at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:176)
          at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:518)
          at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
          at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:827)
          at org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:235)
          at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:297)
          at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:65)
          at org.apache.hive.service.cli.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:141)
          at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:133)
          at org.apache.hive.jdbc.HiveConnection.createHttpTransport(HiveConnection.java:267)
          at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:201)
          at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:168)
          at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
          at java.sql.DriverManager.getConnection(DriverManager.java:664)
          at java.sql.DriverManager.getConnection(DriverManager.java:270)
          at prodhive.main(prod_test.java:25)
  Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.VersionInfo</p>
  
  <pre><code>private static String driverName = "org.apache.hive.jdbc.HiveDriver";
  
  public static void main(String[] args) throws SQLException {
      try {
          Class.forName(driverName);
          System.out.println("Driver Registered");
  
      } catch (ClassNotFoundException e) {
          e.printStackTrace();
          System.out.println("Exception Occured");
          System.exit(1);
      }
  
      System.out.println("before connection");
      Connection con = DriverManager.getConnection(
              ("jdbc:hive2://abc.xyz.com:10000/default;principal=hive/_HOST@XYZ.COM;KrbRealm=PQR.COM;KrbHostFQDN=abc.xyz.com;KrbServiceName=hive;KrbAuthType=0;SSLKeyStore=/home/arcosadmin/va.xyz.com.jks;SSLKeyStorePwd=1234;transportMode=http;httpPath=cliservice;SSL=1;AuthMech=3;UID=HS2;PWD=1234")
  
      System.out.println("Connection Established Successfully");
      Statement stmt = con.createStatement();
      System.out.println("Table Creation Started");
      String tableName = "hive_con";
      stmt.executeUpdate("CREATE TABLE IF NOT EXISTS " + tableName + "(eid int, name String,destination String)");
      System.out.println("Table have been created");
      con.close();
      System.out.println("Connection Closed");
  
  }
  </code></pre>