在Window下启动Hadoop-0.21.0版本时,会出现下面这样的错误提示:
1
java.lang.NoClassDefFoundError: org
/
apache
/
hadoop
/
util
/
PlatformName
2
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.PlatformName
3
4
at java.net.URLClassLoader$
1
.run(URLClassLoader.java:
202
)
5
at java.security.AccessController.doPrivileged(Native Method)
6
at java.net.URLClassLoader.findClass(URLClassLoader.java:
190
)
7
at java.lang.ClassLoader.loadClass(ClassLoader.java:
307
)
8
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
301
)
9
at java.lang.ClassLoader.loadClass(ClassLoader.java:
248
)
10
Could not find the main
class
: org.apache.hadoop.util.PlatformName. Program wil
11
l exit.
经过不断的查找原因和尝试,终于有了解决这个错误的办法,只需要将${HADOOP_HOME}/bin/hadoop-config.sh文件中的第190行的一下的内容
JAVA_PLATFORM
=
`CLASSPATH
=
${CLASSPATH} ${JAVA}
-
Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS}
org.apache.hadoop.util.PlatformName
|
sed
-
e
"
s/ /_/g
"
`
修改成以下的内容即可
JAVA_PLATFORM
=
`CLASSPATH
=
${CLASSPATH} ${JAVA}
-
Xmx32m
-
classpath ${HADOOP_COMMON_HOME}
/
hadoop
-
common
-
0.21
.
0
.jar
org.apache.hadoop.util.PlatformName
|
sed
-
e
"
s/ /_/g
"
`
分享到:
相关推荐
at org.apache.hadoop.yarn.client.api.TimelineClient.createTimelineClient(TimelineClient.java:45) at org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.serviceInit(YarnClientImpl.java:163) at org...
运行Sqoop报错:Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/avro/LogicalType,下载此资源放到Sqoop的lib目录下即可
flink-hadoop-compatibility_2.12-1.7.1.jar javax.ws.rs-api-2.0.1.jar jersey-common-2.27.jar ...Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/api/client/config/ClientConfig
解决方案:Exceptionin thread "main" java.lang.UnsatisfiedLinkError:org.apache.hadoop.util.NativeCrc32.nativeCo
"java.lang.NoClassDefFoundError错误解决办法" java.lang.NoClassDefFoundError错误是一种常见的Java错误,它发生在Java虚拟机在编译时能找到合适的类,而在运行时不能找到合适的类导致的错误。下面是该错误的解决...
`Exception in thread "main" java.lang.NoClassDefFoundError` 是Java编程中常见的一个运行时异常,通常发生在尝试运行一个Java程序时,如果JVM找不到在类路径(ClassPath)中定义的主要类(主类,即包含`public ...
Exception in thread "main" java.lang.UnsatisfiedLinkError:''boolean org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(java.lang.String, int)' * at org.apache.hadoop.io.nativeio.NativeIO$...
at org.apache.hadoop.util.Shell.runCommand(Shell.java:482) at org.apache.hadoop.util.Shell.run(Shell.java:455) at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715) at ...
ERROR org.apache.hadoop.mapred.TaskTracker: Can not start task tracker because java.io.IOException: Failed to set permissions of path: \tmp\hadoop-admin \mapred\local\ttprivate to 0700 at org.apache...
NULL 博文链接:https://ouyida3.iteye.com/blog/1144326
util.Shell (Shell.java:(694)) - Did not find ...java.io.FileNotFoundException: Could not locate Hadoop executable: E:\hadoop-3.0.2\bin\winutils.exe -see https://wiki.apache.org/hadoop/WindowsProblems
### Hadoop安装包下载地址详解 #### Hadoop简介与下载指南 Hadoop是一款开源软件框架,主要用于分布式存储和处理大规模数据集。它基于Google的MapReduce论文和其他相关论文设计而成,能够有效地支持海量数据的存储...
hadoop. io. nativeio. NativeIOSWindows . access0 (Ijava/ lang/String;I)Z 原因:在调用NativeIO中的access0()时调不到 解决方法:①第一步:在项目工程中加入NativelO.java,注意包名必须与源码中...
当从本地上传文件到HDFS中...org.apache.hadoop.fs.ChecksumException: Checksum error: file:/hyk/data/hyk.txt [root@node01 data]# hadoop fs -put hyk.txt /hyk/test 20/02/18 12:54:39 INFO fs.FSInputChecker: Fo
wget https://archive.apache.org/dist/hadoop/core/hadoop-2.7.7/hadoop-2.7.7.tar.gz tar -xzf hadoop-2.7.7.tar.gz sudo mv hadoop-2.7.7 /usr/local/hadoop 3. 配置Hadoop 编辑/usr/local/hadoop/etc/hadoop/...
at org.apache.hadoop.util.Shell.runCommand(Shell.java:482) 2:window10操作系统下面。hadoop-2.6.4版本,解决上面这个问题的必须两个文件。详细见博客:http://www.cnblogs.com/biehongli/p/7895857.html 3:...
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234) at org.apache.sqoop.Sqoop.runTool...
org.apache.hadoop.lib.lang org.apache.hadoop.lib.server org.apache.hadoop.lib.service org.apache.hadoop.lib.service.hadoop org.apache.hadoop.lib.service.instrumentation org.apache.hadoop.lib....