线程“主”中的异常java.lang.NoClassDefFoundError:com / google / common / base /前提条件 [英] Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Preconditions

查看:520
本文介绍了线程“主”中的异常java.lang.NoClassDefFoundError:com / google / common / base /前提条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行java map的同时,减少eclipse中的应用程序,并面对下面的异常。我已经在我的构建路径中包含了commons-logging-1.2.jar文件,但仍然在下面。

While running by java map reduce application in eclipse, and facing the below exception. I have included the commons-logging-1.2.jar file in my build path also, but still below is coming.

我是hadoop的新手。请帮助我。

I am new to hadoop. Kindly help me out.

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
    at org.apache.hadoop.conf.Configuration$DeprecationDelta.<init>(Configuration.java:314)
    at org.apache.hadoop.conf.Configuration$DeprecationDelta.<init>(Configuration.java:327)
    at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:409)
    at AverageNosClass.main(AverageNosClass.java:71)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Preconditions
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 4 more


推荐答案

确保您已将正确的JAR添加到您的构建路径。

Make sure you have added the correct Jar to your build path..

这篇关于线程“主”中的异常java.lang.NoClassDefFoundError:com / google / common / base /前提条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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