Sqoop运行报错NoClassDefFoundError: org/apache/hadoop/mapreduce/InputFormat
Sqoop安装好之后运行报错NoClassDefFoundError: org/apache/hadoop/mapreduce/InputFormat如下:21/01/27 08:25:49 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/002e434d1bd3a0780e4d1748ed2511bd/
·
Sqoop安装好之后运行报错
NoClassDefFoundError: org/apache/hadoop/mapreduce/InputFormat
如下:
21/01/27 08:25:49 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/002e434d1bd3a0780e4d1748ed2511bd/QueryResult.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/InputFormat
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
解决方法:
1.查看hadoop-common-2.8.5.jar是否已经拷贝到sqoop的lib目录下;
2.查看配置文件
export HADOOP_COMMON_HOME=/usr/software/hadoop
export HADOOP_MAPRED_HOME=/usr/software/hadoop
export HIVE_HOME=/usr/software/hive
配置的是否正确
更多推荐
已为社区贡献1条内容
所有评论(0)