Runtimeexception: java.lang.NoSuchMethodException: tfidf$Reduce.<init>()

不打扰是莪最后的温柔 提交于 2019-12-12 11:48:21

问题


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

回答1:


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



来源:https://stackoverflow.com/questions/16196931/runtimeexception-java-lang-nosuchmethodexception-tfidfreduce-init

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!