文章目录
- 编译hadoop遇到的问题
- java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName
- java.lang.ClassNotFoundException: org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos\$MasterService\$BlockingInterface
- java.lang.ClassNotFoundException: org.apache.hbase.thirdparty.com.google.protobuf.RpcController
- java.lang.ClassNotFoundException: org.apache.commons.lang3.ArrayUtils
- java.lang.ClassNotFoundException: org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup
编译hadoop遇到的问题
java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.util.ServiceConfigurationError: org.apache.hadoop.fs.FileSystem: Provider org.apache.hadoop.fs.viewfs.ViewFileSystem could not be instantiated
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$100(Unknown Source)
at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at org.apache.hadoop.fs.FileSystem.loadFileSystems(FileSystem.java:2364)
at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2375)
at org.apache.hadoop.fs.FsUrlStreamHandlerFactory.<init>(FsUrlStreamHandlerFactory.java:62)
at org.apache.hadoop.fs.FsUrlStreamHandlerFactory.<init>(FsUrlStreamHandlerFactory.java:55)
at hive.HiveJdbc.<clinit>(HiveJdbc.java:21)
Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName
at org.apache.hadoop.security.UserGroupInformation.getOSLoginModuleName(UserGroupInformation.java:337)
at org.apache.hadoop.security.UserGroupInformation.<clinit>(UserGroupInformation.java:382)
at org.apache.hadoop.fs.viewfs.ViewFileSystem.<init>(ViewFileSystem.java:130)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
... 8 more
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.PlatformName
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
将hadoop-auth-2.4.0.jar
包进行导入
java.lang.ClassNotFoundException: org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$BlockingInterface
将hbase-protocol-shaded-2.2.2.jar
包进行导入
java.lang.ClassNotFoundException: org.apache.hbase.thirdparty.com.google.protobuf.RpcController
将hbase-shaded-protobuf-2.2.1.jar
包进行导入
java.lang.ClassNotFoundException: org.apache.commons.lang3.ArrayUtils
将commons-lang3-3.6.jar
包进行导入
java.lang.ClassNotFoundException: org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup
将hbase-shaded-netty-2.2.1.jar
包进行导入