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

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

问题描述

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

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

错误如下:

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

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

我使用的是 Hadoop 2.2.0.该程序在早期版本的 Hadoop 上运行良好.但是,现在我需要为版本 2 编写此作业提交程序,但这似乎不起作用.

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.

顺便说一句,我找不到此版本所需的所有 JAR 文件.我已经阅读了类似问题的以下解决方案:hadoop jar 文件在哪里在 hadoop 2 中?.但是,这对我不起作用.它因上述运行时错误而失败.

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.

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

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

有没有人有解决这个问题的方法?我正在使用 NetBeans,如果这因某种原因有任何不同.

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

推荐答案

我通过从 commons.apache 目录 和来自 Maven 存储库.每次我向项目添加新 JAR 时,应用程序都会因不同的错误(未找到不同的类)而崩溃,直到我从 Maven 存储库下载所有 JAR 文件.从网上仓库下载​​了很多JAR文件后,大部分JAR相关的问题似乎都解决了.

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天全站免登陆