使用 Cloudera QuickStart VM 在 Eclipse(Kepler) 中运行时在简单的 Hadoop 程序上看到 JsonMappingException
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException
at org.apache.hadoop.mapreduce.Job$1.run(Job.java:595)
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:1693)
at org.apache.hadoop.mapreduce.Job.connect(Job.java:593)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:581)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:612)
at MaxTemperature.main(MaxTemperature.java:28)
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
正如许多人所建议的那样,尝试从快速启动 VM 添加杰克逊 jar,但没有成功。