Runtimeexception:java.lang.NoSuchMethodException:tfidf $ Reduce。< init>() [英] Runtimeexception: java.lang.NoSuchMethodException: tfidf$Reduce.<init>()

查看:378
本文介绍了Runtimeexception:java.lang.NoSuchMethodException:tfidf $ Reduce。< init>()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解决这个问题:tfidf是我的主要类
为什么运行jar文件后出现这个错误?

how to solve this problem:tfidf is my main class why this error coming after running jar file?

java.lang.RuntimeException: java.lang.NoSuchMethodException: tfidf$Reduce.<init>()
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:115)
    at org.apache.hadoop.mapred.Task$OldCombinerRunner.combine(Task.java:1423)
    at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.sortAndSpill(MapTask.java:1436)
    at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1298)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:437)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:372)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
    at org.apache.hadoop.mapred.Child.main(Child.java:249)
 Caused by: java.lang.NoSuchMethodException: tfidf$Reduce.<init>()
    at java.lang.Class.getConstructor0(Class.java:2715)
    at java.lang.Class.getDeclaredConstructor(Class.java:1987)
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:109)
    ... 10 more


推荐答案

我认为这是试图实例化一个reducer。将您的reducer类声明为静态并尝试。

I think it is trying to instantiate a reducer. Declare your reducer class as static and try.

这篇关于Runtimeexception:java.lang.NoSuchMethodException:tfidf $ Reduce。&lt; init&gt;()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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