报错详情:

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. scala学习手记11 - 类定义

    这里会通过与Java比较的方式来说明scala是如何创建类的. 先来看一下Java中是如何定义一个类的: public class Car { private final int year; priv ...

  2. SpannableString实现TextView的链接效果

    SpannableString实现TextView的链接效果 一.简介 TextView使用SpannableString设置复合文本TextView通常用来显示普通文本,但是有时候需要对其中某些文本 ...

  3. python中*和**的打包和解包

    python中的*和**,能够让函数支持任意数量的参数,它们在函数定义和调用中,有着不同的目的 一. 打包参数 * 的作用:在函数定义中,收集所有的位置参数到一个新的元组,并将这个元组赋值给变量arg ...

  4. 如何查看Windows10连接的WiFi密码

    1.找到 WiFi 图标,右击鼠标,点击 打开‘网络和internet设置’ 2.点击 1 所指图标,然后点击 2 所指图标 3.鼠标左击图标 4.点击如下图标 5.先点击 1 的图标,在勾选 2 的 ...

  5. cenOs7安装redis

    1.安装redis redis 目前没有官方 RPM 安装包,我们需要从源代码编译,而为了要编译就需要安装 Make 和 GCC. 如果没有安装过 GCC 和 Make,那么就使用 yum 安装 -- ...

  6. 通过 HTTP 请求加载远程数据(ajax,axios)

    1.http://blog.csdn.net/liaoxiaojuan233/article/details/54176798 (Axios(JS HTTP库/Ajax库)) 2.https://ww ...

  7. 各种WEB服务器自带的默认Servlet名称

    Tomcat, Jetty, JBoss, and GlassFish 自带的默认Servlet的名字 -- "default" Google App Engine 自带的 默认S ...

  8. java mybatis XML文件中大于号小于号转义(转载)

    因为这个是xml文件不允许出现类似“>”这样的字符 用了转义字符把>和<替换掉,然后就没有问题了. XML转义字符 字段 符号 说明 &lt ; < 小于号 & ...

  9. Android性能优化系列总篇

    目前性能优化专题已完成以下部分: 性能优化总纲——性能问题及性能调优方式 性能优化第四篇——移动网络优化 性能优化第三篇——Java(Android)代码优化 性能优化第二篇——布局优化 性能优化第一 ...

  10. HTTPPost/AFNetWorking/JSONModel/NSPredicate

    一.HTTPPost================================================ 1. POST方式发送请求 HTTP协议下默认数据发送请求方法是GET方式,若需要 ...