java - Error: Could not find or load main class org.apache.hadoop.hdfs.server.datanode.DataNode -


i new apache hadoop. installing multi-node cluster getting 2 errors. not aware kind of errors these , why have generated.i have googled alot errors not able find out reason behind error generation.

  error:could not find or load main class org.apache.hadoop.util.platformname    error: not find or load main class org.apache.hadoop.hdfs.server.datanode.datanode 

both errors generated due datanode or slaves. need know kind of errors, reason generation,and how resolve them. thank you.

error:could not find or load main class org.apache.hadoop.util.platformname

error: not find or load main class org.apache.hadoop.hdfs.server.datanode.datanode

these errors occur if hadoop cannot find hadoop-core-1.2.1.jar file in classpath.

to rectify error, need add file in hadoop classpath.

1. copy hadoop-core-1.2.1.jar $hadoop_home/lib folder

2. add following line in hadoop-env.sh:

export hadoop_classpath=$hadoop_classpath:$hadoop_home/lib/hadoop-core-1.2.1.jar

note: $hadoop_home should point hadoop installation folder.

optional: if want avoid other "could not find or load main class" error in future, instead of step 2.

export hadoop_classpath=$hadoop_classpath:$hadoop_home/lib/*.jar


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -