彻底解决hadoop-0.21.0-eclipse-plugin插件安装

安装插件,配置好连接之后 ,点击大象图标,eclipse不停的连接,陷入死循环(如无法弹出配置界面,请参考上篇)。如图
彻底解决hadoop-0.21.0-eclipse-plugin插件安装_第1张图片
Erro-log 提示ClassNotFoundException: org.apache.hadoop.hdfs.DistributedFileSystem
彻底解决hadoop-0.21.0-eclipse-plugin插件安装_第2张图片
分析原因是由于lib底下的jar不全造成。2.1之前是hadoop-core.Jar,2.1默认只提供了hadoop-common.Jar,没有包含hadoop-hdfs-0.21.0.jar、hadoop-mapred-0.21.0.jar、hadoop-mapred-tools-0.21.0.jar,而原来的hadoop-core实际是包含上述多个jar的。
彻底解决hadoop-0.21.0-eclipse-plugin插件安装_第3张图片

解决办法,将hadoop-hdfs-0.21.0.jar、hadoop-mapred-0.21.0.jar、hadoop-mapred-tools-0.21.0.jar放置到hadoop-0.21.0-eclipse-plugin.jar下的lib中
彻底解决hadoop-0.21.0-eclipse-plugin插件安装_第4张图片
修改MANIFEST.MF
Bundle-ClassPath: Bundle-ClassPath: Bundle-ClassPath: classes/,lib/hadoop-common.jar,lib/hadoop-hdfs-0.21.0.jar,lib/hadoop-mapred-0.21.0.jar,lib/hadoop-mapred-tools-0.21.0.jar,lib/log4j-1.2.15.jar

再将MANIFEST.MF放回hadoop-0.21.0-eclipse-plugin.jar中
(由于hadoop-mapred-0.21.0.jar还需要log4j-1.2.15.jar,还需要将log4j-1.2.15.jar,放到lib中)
彻底解决hadoop-0.21.0-eclipse-plugin插件安装_第5张图片


附:个人修正后的插件,在附件中下载

你可能感兴趣的:(apache,eclipse,hadoop,log4j,ITeye)