nexr / RHive

RHive is an R extension facilitating distributed computing via Apache Hive.
http://nexr.github.io/RHive
122 stars 63 forks source link

Exception in thread "Thread-8" #65

Closed Ironholds closed 9 years ago

Ironholds commented 10 years ago

Full error:

Exception in thread "Thread-8" java.lang.RuntimeException: java.sql.SQLException: >java.lang.ClassNotFoundException at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.connect(HiveJdbcClient.java:337) at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.run(HiveJdbcClient.java:322) Caused by: java.sql.SQLException: java.lang.ClassNotFoundException at com.nexr.rhive.hive.DatabaseConnection.connect(DatabaseConnection.java:41) at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.connect(HiveJdbcClient.java:330) ... 1 more Caused by: java.lang.ClassNotFoundException at RJavaClassLoader.findClass(RJavaClassLoader.java:383) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:190) at com.nexr.rhive.hive.DatabaseConnection.connect(DatabaseConnection.java:38) ... 2 more Error: java.lang.IllegalStateException: Not connected to hiveserver

This is with CDH5 and Hive 0.12, and, following:

Sys.setenv(RHIVE_FS_HOME="/user/ironholds/rhive/") library(RHive) rhive.init(hiveHome = "usr/lib/hive/", hadoopHome = "/usr/lib/hadoop/", hadoopLib = "/usr/lib/hadoop/lib/", hadoopConf = "/etc/hadoop/conf/") rhive.connect(host="analytics1027.eqiad.wmnet",port=10000, hiveServer2=TRUE, defaultFS=NULL, updateJar=FALSE, user=NULL, password=NULL)

prabhunkl commented 10 years ago

do not use defautlFS, User and Password while connection to Hive server. try with bellow line of code.

rhive.connect(host="analytics1027.eqiad.wmnet",port=10000, hiveServer2=TRUE)
Ironholds commented 10 years ago

Exception is now in thread-4 ;p

Ironholds commented 10 years ago

To clarify: when I follow your approach, the change is...

cheebingloh commented 9 years ago

Hi All, so whats the solution for it?

ssshow16 commented 9 years ago

How to install RHive?

I guess that you install it from Github. If yes, you have to compile with and after that, install RHive.

Ironholds commented 9 years ago

There doesn't appear to be a solution for it. I just gave up and rolled my own connector via RJDBC.

cheebingloh commented 9 years ago

I did use RJDBC for it as well. Do you able to write table back to Hive from R data frame?

jingjingyangg commented 8 years ago

@ssshow16 I did compile the codes with

- ant build - R CMD build RHive - R CMD INSTALL RHive_2.0-0.10.tar.gz

But I am having the same error as the OP. Any thoughts? Thanks in advance!