0

I am trying to run hadoop dfs command on cygwin with Hadoop - 2.6.3

I am running following command

/cygdrive/c/hadoop-2.6.4/bin/hadoop dfs -put word1 words/ which eventually throws an error

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:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.hadoop.fs.FsShell.  Program will exit.
Exception in thread "main"

I have setup paths correctly

  $ echo $JAVA_HOME
C:\Program Files\Java\jdk1.6.0_31

and

$ echo $HADOOP_HOME
/cygdrive/c/hadoop-2.6.4/

Can anyone help me here?

I also tried running hadoop-env.sh file from $HADOOP_HOME/etc/hadoop but in vain

veer7
  • 20,074
  • 9
  • 46
  • 74
  • @Seth: I haven't written any java code yet. This is the command fired from `hadoop` `bin` folder. It's `hadoop` command. – veer7 Apr 09 '16 at 19:58
  • @Seth: Any idea which dependency it could be? – veer7 Apr 09 '16 at 20:09
  • I found this: http://stackoverflow.com/questions/18974098/exception-in-thread-main-java-lang-noclassdeffounderror-org-apache-hadoop-uti maybe it holds the key? – Seth Apr 09 '16 at 20:25
  • Not sure why but it worked in ubuntu. The same set of things I have done for ubuntu environment. I am keeping this question open so anyone having answer may post it below. – veer7 Apr 11 '16 at 18:28

0 Answers0