|
|
-
Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FsShellTom White 2010-09-15, 22:36
Hi Mike,
What do you get if you type "./hadoop classpath"? Does it contain the Hadoop common JAR? To avoid the deprecation warning you should use "hadoop fs", not "hadoop dfs". Tom On Wed, Sep 15, 2010 at 12:53 PM, Mike Franon <[EMAIL PROTECTED]> wrote: > Hi, > > I just setup 3 node hadoop cluster using the latest version from website , > 0.21.0 > > I am able to start all the daemons, when I run jps I see datanode, namenode, > secondary, tasktracker, but I was running a test and trying to run the > following command: ./hadoop dfs -ls, and I get the following error: > > DEPRECATED: Use of this script to execute hdfs command is deprecated. > Instead use the hdfs command for it. > > Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/hadoop/fs/FsShell > Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FsShell > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:248) > Could not find the main class: org.apache.hadoop.fs.FsShell. Program will > exit. > > If i try this command instead: > > ./hadoop hdfs -ls > Exception in thread "main" java.lang.NoClassDefFoundError: hdfs > Caused by: java.lang.ClassNotFoundException: hdfs > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:248) > Could not find the main class: hdfs. Program will exit. > > Does anyone know what the command really is I should be using? > > Thanks > |