Hadoop 2.0 JAR文件 [英] Hadoop 2.0 JAR files

查看:124
本文介绍了Hadoop 2.0 JAR文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试在我的Map / Reduce程序中实例化 Configuration 对象时,出现意外错误。



错误如下:


java.lang.NoClassDefFoundError:org / apache / commons / logging / LogFactory


我正在使用Hadoop 2.2.0。该程序在早期版本的Hadoop中运行良好。但是,现在我需要为第2版编写这个作业提交程序,而且这似乎不起作用。



作为一个附注,我无法找到所有这个版本需要JAR文件。我已阅读以下解决方案以解决类似问题: hadoop jar文件在哪里在hadoop 2中?。但是,这并不适合我。它失败,出现上面的运行时错误。

我尝试使用旧的JAR文件来解决这些问题,但新的错误不断发生。



有没有人有解决这个问题的办法?我使用NetBeans,如果这有什么区别的话。

解决方案

我通过从<一个href =http://commons.apache.org/proper/commons-logging/download_logging.cgi =nofollow> commons.apache目录和Maven仓库。每次我向项目中添加一个新的JAR时,应用程序崩溃时都会发生另一个错误(找不到一个不同的类),直到我从Maven存储库中下载了所有JAR文件。从联机存储库下载大量JAR文件后,大部分JAR相关问题似乎都已解决。


I am getting an unexpected error when trying to instantiate a Configuration object in my Map/Reduce program.

The error is as follows:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

I am using Hadoop 2.2.0. The program worked fine with an earlier version of Hadoop. However, now I need to write this job submitter for the version 2, and this does not seem to be working.

As a side note, I could not find all the required JAR files for this version. I have read the following solution to a similar problem: Where are hadoop jar files in hadoop 2?. However, this did not work for me. It fails with the above runtime error.

I tried using older JAR files to resolve these issues, but new error keep occurring.

Does anyone have a solution to this problem? I am using NetBeans, if that makes any difference from some reason.

解决方案

I resolved the problem by downloading the JAR files from commons.apache directory and from Maven repositories. Each time I added a new JAR to the project, the application crashed with a different error (a different class was not found) until I downloaded all of the JAR files from the Maven repository. After downloading a lot of JAR files from the online repositories, most of the JAR related problems seem to be resolved.

这篇关于Hadoop 2.0 JAR文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆