runtimeexception:java.lang.nosuchmethodexception:tfidf$reduce.< init>()

evrscar2  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(460)

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

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
2guxujil

2guxujil1#

我认为它是在尝试示例化一个减速机。将reducer类声明为static并重试。

相关问题