<?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 ClassCastException on Drop table query in apache spark hive in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassCastException-on-Drop-table-query-in-apache-spark-hive/m-p/148344#M35920</link>
    <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;/TD&gt;
&lt;TD&gt;&lt;P&gt;I'm using the following hive query :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;this.queryExecutor.executeQuery("Drop table user")
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and am getting the following exception :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;java.lang.LinkageError: ClassCastException: attempting to castjar:file:/usr/hdp/2.4.2.0-258/spark/lib/spark-assembly-1.6.1.2.4.2.0-258-hadoop2.7.1.2.4.2.0-258.jar!/javax/ws/rs/ext/RuntimeDelegate.classtojar:file:/usr/hdp/2.4.2.0-258/spark/lib/spark-assembly-1.6.1.2.4.2.0-258-hadoop2.7.1.2.4.2.0-258.jar!/javax/ws/rs/ext/RuntimeDelegate.class
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I saw there have been similar posts &lt;A href="http://stackoverflow.com/questions/37009683/spark-hive-java-lang-linkageerror"&gt;here&lt;/A&gt; and &lt;A href="http://stackoverflow.com/questions/36150691/get-a-java-lang-linkageerror-classcastexception-when-use-spark-sql-hivesql-on-y"&gt;here&lt;/A&gt; but they haven't had any response till now.&lt;/P&gt;&lt;P&gt;Whats intriguing is that this is specific when we try to use drop table (or drop table if exists) query.&lt;/P&gt;&lt;P&gt;Hoping to find resolution for the same.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Tue, 26 Jul 2016 17:40:49 GMT</pubDate>
    <dc:creator>kanwar_singh</dc:creator>
    <dc:date>2016-07-26T17:40:49Z</dc:date>
    <item>
      <title>ClassCastException on Drop table query in apache spark hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassCastException-on-Drop-table-query-in-apache-spark-hive/m-p/148344#M35920</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;/TD&gt;
&lt;TD&gt;&lt;P&gt;I'm using the following hive query :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;this.queryExecutor.executeQuery("Drop table user")
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and am getting the following exception :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;java.lang.LinkageError: ClassCastException: attempting to castjar:file:/usr/hdp/2.4.2.0-258/spark/lib/spark-assembly-1.6.1.2.4.2.0-258-hadoop2.7.1.2.4.2.0-258.jar!/javax/ws/rs/ext/RuntimeDelegate.classtojar:file:/usr/hdp/2.4.2.0-258/spark/lib/spark-assembly-1.6.1.2.4.2.0-258-hadoop2.7.1.2.4.2.0-258.jar!/javax/ws/rs/ext/RuntimeDelegate.class
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I saw there have been similar posts &lt;A href="http://stackoverflow.com/questions/37009683/spark-hive-java-lang-linkageerror"&gt;here&lt;/A&gt; and &lt;A href="http://stackoverflow.com/questions/36150691/get-a-java-lang-linkageerror-classcastexception-when-use-spark-sql-hivesql-on-y"&gt;here&lt;/A&gt; but they haven't had any response till now.&lt;/P&gt;&lt;P&gt;Whats intriguing is that this is specific when we try to use drop table (or drop table if exists) query.&lt;/P&gt;&lt;P&gt;Hoping to find resolution for the same.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 26 Jul 2016 17:40:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassCastException-on-Drop-table-query-in-apache-spark-hive/m-p/148344#M35920</guid>
      <dc:creator>kanwar_singh</dc:creator>
      <dc:date>2016-07-26T17:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: ClassCastException on Drop table query in apache spark hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassCastException-on-Drop-table-query-in-apache-spark-hive/m-p/148345#M35921</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/12007/kanwarsingh.html"&gt;kanwar singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;user&lt;/STRONG&gt; is a reserved word in hive. You need to use escape characters for it. They are the back ticks, e.g. `user`. Since you are passing the statement as a string, you may have to escape the back-tick ` as well using a back-slash, \`. &lt;/P&gt;&lt;P&gt;Additionally, commands issued in hive require a semi-colon at the end.&lt;/P&gt;&lt;P&gt;To test the above theory just try to drop a table that does not have a reserved keyword in hive, e.g. MyTable.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/12007/kanwarsingh.html"&gt;&lt;/A&gt;If this helps, please vote/accept answer.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:10:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassCastException-on-Drop-table-query-in-apache-spark-hive/m-p/148345#M35921</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-07-28T09:10:15Z</dc:date>
    </item>
  </channel>
</rss>

