<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Exception in thread &amp;quot;main&amp;quot; java.sql.SQLException: org.apache.thrift.transport.TTransportException in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Exception-in-thread-quot-main-quot-java-sql-SQLException-org/m-p/45859#M42504</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the following error while connecting to Hive using Jdbc with org.apache.hadoop.hive.jdbc.HiveDriver.&lt;/P&gt;&lt;P&gt;Help Me to solve this.&lt;/P&gt;&lt;P&gt;Exception in thread "main" java.sql.SQLException: org.apache.thrift.transport.TTransportException&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:191)&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:127)&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveConnection.configureConnection(HiveConnection.java:126)&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveConnection.&amp;lt;init&amp;gt;(HiveConnection.java:121)&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)&lt;BR /&gt;at java.sql.DriverManager.getConnection(DriverManager.java:571)&lt;BR /&gt;at java.sql.DriverManager.getConnection(DriverManager.java:215)&lt;BR /&gt;at com.cloudera.hive.HiveConnectDB.main(HiveConnectDB.java:18)&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 10:42:58 GMT</pubDate>
    <dc:creator>SudheerHadoop</dc:creator>
    <dc:date>2022-09-16T10:42:58Z</dc:date>
    <item>
      <title>Exception in thread "main" java.sql.SQLException: org.apache.thrift.transport.TTransportException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Exception-in-thread-quot-main-quot-java-sql-SQLException-org/m-p/45859#M42504</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the following error while connecting to Hive using Jdbc with org.apache.hadoop.hive.jdbc.HiveDriver.&lt;/P&gt;&lt;P&gt;Help Me to solve this.&lt;/P&gt;&lt;P&gt;Exception in thread "main" java.sql.SQLException: org.apache.thrift.transport.TTransportException&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:191)&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:127)&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveConnection.configureConnection(HiveConnection.java:126)&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveConnection.&amp;lt;init&amp;gt;(HiveConnection.java:121)&lt;BR /&gt;at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)&lt;BR /&gt;at java.sql.DriverManager.getConnection(DriverManager.java:571)&lt;BR /&gt;at java.sql.DriverManager.getConnection(DriverManager.java:215)&lt;BR /&gt;at com.cloudera.hive.HiveConnectDB.main(HiveConnectDB.java:18)&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:42:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Exception-in-thread-quot-main-quot-java-sql-SQLException-org/m-p/45859#M42504</guid>
      <dc:creator>SudheerHadoop</dc:creator>
      <dc:date>2022-09-16T10:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Exception in thread "main" java.sql.SQLException: org.apache.thrift.transport.TTranspo</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Exception-in-thread-quot-main-quot-java-sql-SQLException-org/m-p/45955#M42505</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe you could share the java source code doing the connection ?&lt;/P&gt;&lt;P&gt;Here is a really small working sample :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public class ManageHive {&lt;BR /&gt;&lt;BR /&gt;   private static String driverName = "org.apache.hive.jdbc.HiveDriver";&lt;BR /&gt;   private static Logger logger = Logger.getLogger(ManageHive.class);&lt;BR /&gt; &lt;BR /&gt;   public static Connection getConnection(LoadProperties prop, String user) throws ClassNotFoundException, SQLException {&lt;BR /&gt; &lt;BR /&gt;      String hiveJdbc = prop.getPropertyByName("hive_jdbc");&lt;BR /&gt; &lt;BR /&gt;      try {&lt;BR /&gt;         Class.forName(driverName);&lt;BR /&gt;      } catch (ClassNotFoundException e) {&lt;BR /&gt;         e.printStackTrace();&lt;BR /&gt;         throw e;&lt;BR /&gt;      }&lt;BR /&gt;      Connection conn2 = DriverManager.getConnection(hiveJdbc+"/extraction", user, "");&lt;BR /&gt;      return conn2;&lt;BR /&gt;   }&lt;BR /&gt; &lt;BR /&gt;   public static void execSql(LoadProperties prop, String user, String sql) throws SQLException, ClassNotFoundException {&lt;BR /&gt; &lt;BR /&gt;      Connection maConn = getConnection(prop,user);&lt;BR /&gt;      Statement stmt = maConn.createStatement();&lt;BR /&gt; &lt;BR /&gt;      int result = stmt.executeUpdate(sql);&lt;BR /&gt;      if ( result == Statement.EXECUTE_FAILED ) {&lt;BR /&gt;         throw new SQLException("Erreur d'execution.");&lt;BR /&gt;      }&lt;BR /&gt;   }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 12:37:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Exception-in-thread-quot-main-quot-java-sql-SQLException-org/m-p/45955#M42505</guid>
      <dc:creator>mathieu.d</dc:creator>
      <dc:date>2016-10-05T12:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exception in thread "main" java.sql.SQLException: org.apache.thrift.transport.TTranspo</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Exception-in-thread-quot-main-quot-java-sql-SQLException-org/m-p/45956#M42506</link>
      <description>&lt;P&gt;Hi Thanks for the Reply,I solved the issue.I have used following driver&lt;/P&gt;&lt;P&gt;public static String driverName = "com.cloudera.hive.jdbc41.HS1Driver";and added other required jars too.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 12:52:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Exception-in-thread-quot-main-quot-java-sql-SQLException-org/m-p/45956#M42506</guid>
      <dc:creator>SudheerHadoop</dc:creator>
      <dc:date>2016-10-05T12:52:22Z</dc:date>
    </item>
  </channel>
</rss>

