报错详情:

WARN mapred.JobClient: No job jar file set.  User classes may not be found. See JobConf(Class) or JobConf#setJar(String).
10/08/16 15:25:49 INFO input.FileInputFormat: Total input paths to process : 4
10/08/16 15:25:50 INFO mapred.JobClient: Running job: job_201008161439_0004
10/08/16 15:25:51 INFO mapred.JobClient:  map 0% reduce 0%
10/08/16 15:26:00 INFO mapred.JobClient: Task Id : attempt_201008161439_0004_m_000000_0, Status : FAILED
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hadoop.examples.WordCount2$WordCountMapper
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:808)
at org.apache.hadoop.mapreduce.JobContext.getMapperClass(JobContext.java:157)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:532)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.examples.WordCount2$WordCountMapper
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

 报错原因:

找不到job任务运行的资源,如map类、reduce类等。

 解决方案:

新增
public class InitMain{
Job job = new Job();
job.setJarByClass(InitMain.class); //只要是Initmain类所在包下的任一个类名都可以,默认为当前 job所在类名。
}

 扩展:

Hadoop之——MapReduce job的几种运行模式

运行一个Hadoop Job所需要指定的属性

MapReduce 中job.setJarByClass()方法的疑惑

Hadoop Job的提交

mapred.JobClient: No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).的更多相关文章

  1. eclipse下提交job时报错mapred.JobClient: No job jar file set. User classes may not be found.

    错误信息: 11/10/14 13:52:07 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. A ...

  2. eclipse 运行 mapreduce程序报错 No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).

    报错信息 17/07/06 17:00:27 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Ap ...

  3. eclipse 中的 jar file 和 runnable jar file的区别

    转自于:http://blog.csdn.net/lijiecong/article/details/6266234 java最难学的就是角落的东东了,不愧叫做java平台.搜索了一把总算明白了. 直 ...

  4. 现网环境业务不影响,但是tomcat启动一直有error日志,ERROR org.apache.catalina.startup.ContextConfig- Unable to process Jar entry [module-info.class] from Jar [jar:file:/home/iufs/apache-tomcat/webapps/iufs/WEB-INF/lib/asm

    完整的错误日志信息: 2019-03-19 15:30:42,021 [main] INFO org.apache.catalina.core.StandardEngine- Starting Ser ...

  5. An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classp

    背景介绍: 当ES中guava库与hive等组件的库冲突时,对Elasticsearch库进行shade,relocate解决库冲突问题. 当使用"org.apache.maven.plug ...

  6. org.apache.jasper.JasperException:Unable to read TLD "META-INF/c-1_0-rt.tld" from JAR file jstl-1.2.jar

    前两天把项目从eclipse EE版搬到MyEclipse中了.配置好jdk,确定build path中没有报错后,在tomcat中运行.结果,报错: org.apache.jasper.Jasper ...

  7. Eclipse------使用Debug As时报错java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/XXX

    报错信息: java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file ...

  8. Unable to read TLD "META-INF/c.tld" from JAR file

      Unable to read TLD "META-INF/c.tld" from JAR file CreationTime--2018年7月18日17点46分 Author: ...

  9. Failed to read Class-Path attribute from manifest of jar file:/XXX问题

    java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/XXX ...

随机推荐

  1. ZC_异常

    1. “Exception in thread "main" java.lang.UnsatisfiedLinkError: no JniVC6 in java.library.p ...

  2. MyEclipse安装git插件

    安装egit插件的步骤(安装egit不成功的原因主要是下载的egit版本不适合当前使用的eclipse版本).先检查自己MyEclipse适用egit的版本. 查看自己MyEclipse版本,如下图: ...

  3. 利用Python检验你的策略参数是否过拟合(转)

    过拟合现象 一般来说,量化研究员在优化其交易策略参数时难免会面临这样一个问题:优化过后的策略在样本内表现一般来说均会超过其在样本外的表现,即参数过拟合.对于参数优化来说,由于优化时存在噪音,过拟合是不 ...

  4. 不同局域网如何利用charles对app进行抓包

    晚上遇到了一种尴尬的场景:电脑并没有无线网卡,电脑是通过有线连接的,但是手机连的是公共的wifi,二者并不在同一个网段 在试过很多办法无解后,终于百度出一种"曲线救国"的办法(以荣 ...

  5. python多线程抓取代理服务器

    文章转载自:https://blog.linuxeye.com/410.html 代理服务器:http://www.proxy.com.ru #coding: utf-8 import urllib2 ...

  6. 【Hive】自定义函数

    Hive的自定义函数无法满足实际业务的需要,所以为了扩展性,Hive官方提供了自定义函数来实现需要的业务场景. 1.定义 (1)udf(user defined function):  自定义函数,特 ...

  7. 【MAF】MAF插件框架简介

    引言    Managed Add-In Framework是一个插件式框架.它有两大作用,一个是解耦,插件和宿主由7个管道组成,两边都有适配器Adapter管道,能最大程度地降低插件和宿主的耦合度: ...

  8. 软工作业-Wc

    Wc.exe wc.exe是一个常见的工具,它能统计文本文件的字符数.单词数和行数.这个项目要求写一个命令行程序,模仿已有wc.exe 的功能,并加以扩充,给出某程序设计语言源文件的字符数.单词数和行 ...

  9. 血的教训 password写成passward,教训应该从首页赋值 参数名

    血的教训 password写成passward,教训应该从首页赋值 参数名

  10. Centos 6.3 Realtek Audio Driver Compile

    /**************************************************************************** * Centos 6.3 Realtek A ...