hadoop出现ava.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException

Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException
        at org.apache.hadoop.mapreduce.Job$1.run(Job.java:563)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
        at org.apache.hadoop.mapreduce.Job.connect(Job.java:561)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:549)
        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:580)
        at com.pzoom.mapred.WordCount.main(WordCount.java:40)
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException
        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)
        ... 8 more
到你的下载的hadoop所在版本的lib包中引入jackson-core-asl-1.8.8.jar   和   jackson-mapper-asl-1.8.8.jar  后错误消失

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。