我正在使用本指南来设置 Hadoop:
http://blog.sqltrainer.com/2012/01/installing-and-configuring-apache.html
但是,当我到达应该输入的部分时,bin/hadoop version
会出现以下错误:
cygpath: can't convert empty path
java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.PlatformName
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.apache.hadoop.util.PlatformName. Program will exit.
Exception in thread "main" cygpath: can't convert empty path
cygpath: can't convert empty path
Hadoop 0.22.0
我最近使用的是 1.0.3 版本,并且运行良好,但由于一个错误,我不得不降级到 0.22.0 版本。不幸的是,我无法让这个版本工作。
更多信息:
JAVA_HOME=/cygdrive/c/Progra~1/Java/jre6