<?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 Re: Apache phoenix 4.5.1 with spark 1.3.1 Classnotfoundexception in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41693#M28874</link>
    <description>&lt;P&gt;I am getting the same error when I try to load a phoenix table into Spark DataFrame. Have you come across same issue with dataframes?&lt;/P&gt;</description>
    <pubDate>Sun, 05 Jun 2016 06:10:28 GMT</pubDate>
    <dc:creator>tsyed</dc:creator>
    <dc:date>2016-06-05T06:10:28Z</dc:date>
    <item>
      <title>Apache phoenix 4.5.1 with spark 1.3.1 Classnotfoundexception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41023#M28870</link>
      <description>&lt;P&gt;We are running spark streaming to get the feed from Kafka. Now we are trying to use Phoenix JDBC to extract some data from HBASE. When I run the code in local its running fine without any issues, but when I run it using yarn-cluster it throws below exception. Using CDH 5.4.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.controller.ClientRpcControllerFactory&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.URLClassLoader$1.run(URLClassLoader.java:366)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.URLClassLoader$1.run(URLClassLoader.java:355)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.security.AccessController.doPrivileged(Native Method)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.URLClassLoader.findClass(URLClassLoader.java:354)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:425)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:358)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.Class.forName0(Native Method)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.Class.forName(Class.java:190)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code snippet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def check(arg0:String,arg1:String)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; val query = "query"&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Class.forName("org.apache.phoenix.jdbc.PhoenixDriver");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var conn =&amp;nbsp; DriverManager.getConnection("jdbc:phoenix:IP:zkport:/znode");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; val statement = conn.createStatement()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; val resultSet = statement.executeQuery(query)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var out="";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(resultSet.next())&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out=resultSet.getString("..")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the SBT dependency added is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libraryDependencies += "org.apache.phoenix" % "phoenix-core" % "4.5.2-cdh5.4.5"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I manually checked for the missing class, and it is there in phoenix-core jar. What is the reason behind yarn/spark throwing an exception. I tried adding it as a separate classpath that doesn't work either. Any workaround for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:20:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41023#M28870</guid>
      <dc:creator>vickyiv</dc:creator>
      <dc:date>2022-09-16T10:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Apache phoenix 4.5.1 with spark 1.3.1 Classnotfoundexception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41037#M28871</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; are you using the Phonex Clab ? What&amp;nbsp; is the version of it ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 12:47:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41037#M28871</guid>
      <dc:creator>matdba</dc:creator>
      <dc:date>2016-05-19T12:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Apache phoenix 4.5.1 with spark 1.3.1 Classnotfoundexception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41044#M28872</link>
      <description>&lt;P&gt;Yes, 4.5.2-cdh5.4.5 is the one in my dependency. Got that from cloudera repo &lt;A href="https://repository.cloudera.com/cloudera/cloudera-repos/org/apache/phoenix/phoenix-core/" target="_blank"&gt;https://repository.cloudera.com/cloudera/cloudera-repos/org/apache/phoenix/phoenix-core/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 13:45:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41044#M28872</guid>
      <dc:creator>vickyiv</dc:creator>
      <dc:date>2016-05-19T13:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Apache phoenix 4.5.1 with spark 1.3.1 Classnotfoundexception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41045#M28873</link>
      <description>&lt;P&gt;Adding phoenix-core to classpath.txt worked. But a weird issue.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 13:59:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41045#M28873</guid>
      <dc:creator>vickyiv</dc:creator>
      <dc:date>2016-05-19T13:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Apache phoenix 4.5.1 with spark 1.3.1 Classnotfoundexception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41693#M28874</link>
      <description>&lt;P&gt;I am getting the same error when I try to load a phoenix table into Spark DataFrame. Have you come across same issue with dataframes?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2016 06:10:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41693#M28874</guid>
      <dc:creator>tsyed</dc:creator>
      <dc:date>2016-06-05T06:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Apache phoenix 4.5.1 with spark 1.3.1 Classnotfoundexception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41710#M28875</link>
      <description>&lt;P&gt;Not with dataframes but i think it is a collon issue with phoenix+spark streaming. You can try adding the jars to classpath and execute&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 14:09:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-phoenix-4-5-1-with-spark-1-3-1-Classnotfoundexception/m-p/41710#M28875</guid>
      <dc:creator>vickyiv</dc:creator>
      <dc:date>2016-06-06T14:09:43Z</dc:date>
    </item>
  </channel>
</rss>

