[opensuse] Re: Apache Hadoop and Java on openSUSE 12.1
Roger Oberholtzer wrote:
I am messing around with Apache Hadoop. I have installed the 1.0.2 RPM on opeSUSE 12.1. I also have installed and enabled jdk-1.7.0_02-fcs.i586, which is Sun's release. When I run one of the commands for setting up Hadoop (as described on http://hadoop.apache.org/common/docs/current/single_node_setup.html), I get this:
# hadoop jar /usr/share/hadoop/hadoop-examples-1.0.2.jar grep input output 'dfs[a-z.]+' java.lang.NoClassDefFoundError: org.apache.hadoop.security.UserGroupInformation at java.lang.Class.initializeClass(libgcj.so.12) at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1494) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1395) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:123) at org.apache.hadoop.examples.Grep.run(Grep.java:87) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.examples.Grep.main(Grep.java:93) at java.lang.reflect.Method.invoke(libgcj.so.12) at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68) at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139) at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64) at java.lang.reflect.Method.invoke(libgcj.so.12) at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
I am curious why the error comes from libgcj.so.12, which is from libgcj46-4.6.2_20111026-1.1.2.i586, which is the GNU version. Does Sun's Java use anything from GNU's Java?
No. Check if $JAVA_HOME is set, that's most often the problem.
I suspect that the problem is that some parts of my Java install are whatever openSUSE 12.2 installs, and part are from Sun.
Is there a documented way to have only Sun's Java installled? Which includes removing the non-Sun components. It seems that most everything Java that I try works better (and sometimes only) with Sun's Java.
That's true, sadly, starting with Eclipse. I have multiple Java installations (in /opt; currently 8 of them), and they can be used in parallel without any problems. It's important that one doesn't set $JAVA_HOME globally. Sometime it's necessary to set JAVA_HOME in a wrapper script to the Java version's directory one uses. HTH, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (1)
-
Joachim Schrod