[R] A question about rJava and the classpath
Saptarshi Guha
saptarshi.guha at gmail.com
Tue Mar 24 02:13:47 CET 2009
Hello,
Since this an R package, I'm sending the email. I'm loading all the
jar files as:
library(rJava)
hadoop <- Sys.getenv("HADOOP")
allfiles <- c(list.files(hadoop,pattern="jar$",full.names=T),list.files(paste(hadoop,"lib",sep=.Platform$file.sep,collapse=""),pattern="jar$",full.names=T))
allfiles <- c(allfiles,"/home/sguha/tmp/x/build/jar/rhipe.jar")
.jinit(classpath=allfiles)
Now, I create a new object
.jnew("org/guha/SeqKeyList",.jnull)
but get this error
Exception in thread "main" java.lang.RuntimeException:
java.lang.ClassNotFoundException:
org.apache.hadoop.hdfs.DistributedFileSystem
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:720)
This does not appear to be possible(ClassNotFound), since
hadoop-0.19-core.jar which is *present* in the output of .jclassPath()
does contain an entry to this class.
Moreover, when run at the command line using the *same* classpath, I
don't get any such error messages.
Is there a possible reason why?
Regards
Saptarshi
Saptarshi Guha
More information about the R-help
mailing list