rhfs.init error

392 views
Skip to first unread message

Amine Mekouar

unread,
Aug 7, 2015, 11:19:49 AM8/7/15
to RHadoop
Hi everyone,

Im running Rhadoop through virtual box and cloudera 5.4. I have an issue running the hdfs.init().. The error below :

Error in .jnew("org/apache/hadoop/conf/Configuration") : 
  java.lang.UnsupportedClassVersionError: org/apache/hadoop/conf/Configuration : Unsupported major.minor version 51.0

How can i solve this, knowing that my java version looks fine :

Java interpreter : /usr/java/jdk1.7.0_67-cloudera/bin/java
Java version     : 1.7.0_67
Java home path   : /usr/java/jdk1.7.0_67-cloudera/jre
Java compiler    : /usr/java/jdk1.7.0_67-cloudera/bin/javac
Java headers gen.: /usr/java/jdk1.7.0_67-cloudera/bin/javah
Java archive tool: /usr/java/jdk1.7.0_67-cloudera/bin/jar


Tks for your help !

AnalyticsGal

unread,
Sep 14, 2015, 11:11:59 AM9/14/15
to RHadoop
Hi ,

I  have the same issue. Can someone help in solving this?Thanks in advance.

> hdfs.init()
Error in .jnew("org/apache/hadoop/conf/Configuration") : 
  java.lang.UnsupportedClassVersionError: org/apache/hadoop/conf/Configuration : Unsupported major.minor version 51.0

Thank you.

Anusha V

unread,
Sep 14, 2015, 12:38:36 PM9/14/15
to RHadoop
Hi All,

I had the same error and I fixed it the following way:
 
This is for Cloudera CDH 5.4.2 and R 3.2.1.

Make sure the java version that is selected is 1.7 or higher using:
sudo update-alternatives --config java

Then run:

sudo JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera R CMD javareconf

This should show up that R is also running with Java 1.7 version now.
Then run the initial hadoop setup commands in R environment.

Voila! It works! :)

Thanks,
Anusha

Hang Yuan

unread,
Oct 1, 2015, 1:37:27 PM10/1/15
to RHadoop

I am having the same problem. The followings are my Java setups on a Mac.


$ java -version

java version "1.7.0_79"

Java(TM) SE Runtime Environment (build 1.7.0_79-b15)

Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

$ javac -version

javac 1.7.0_79

$ echo $JAVA_HOME

/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home


Sys.getenv("JAVA_HOME")

[1] "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home"


There is no update-alternatives command on mac.


Can someone help me detect what is going on?


Thanks,

Hang

Reply all
Reply to author
Forward
0 new messages