Hi All,
I wrote my WordCount program using Netbeans (both on Linux and OS X
platform). When I try running the program from the dist directory (where
NetBeans outputs the jar file after compilation) I get the following error:
~/software/hadoop-0.19.1/bin/hadoop jar WCount.jar wcount.WCount
~/software/hadoop-0.19.1/input/ ~/software/hadoop-0.19.1/output
shell-init: error retrieving current directory: getcwd: cannot access parent
directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent
directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent
directories: No such file or directory
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working
directory.
at java.lang.System.initProperties(Native Method)
at java.lang.System.initializeSystemClass(System.java:1072)
However, if I go to my Hadoop install directory, I get the following error:
bin/hadoop jar WCount.jar wordcount.WCount input/ output/
java.lang.ClassNotFoundException: wcount.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.util.RunJar.main(RunJar.java:158)
at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Any help on this would be great!