Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName

后端 未结 4 1011
你的背包
你的背包 2021-01-04 07:42

I know there have been many posts regarding this exception, but I am not able to fix this issue. Classpath has to be edited I think to resolve it. I am trying to run a prog

相关标签:
4条回答
  • 2021-01-04 07:44

    In my particular case, I am using Maven, and although I had hadoop-auth in both the POM and the classpath, I was still getting this exception.

    What finally fixed it for me was changing the scope for the dependency in the POM from "provided" to "compile".

    0 讨论(0)
  • 2021-01-04 07:55

    hadoop-auth-2.2.0.jar should be there for hadoop2.2.0
    Add hadoop auth jar for your version

    0 讨论(0)
  • 2021-01-04 07:56

    If you are a maven user and faced this issue -

        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
            <version>${hadoop.client.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-common</artifactId>
            <version>${hadoop.client.version}</version>
        </dependency>
    

    NOTE: :hadoop-client:2.5.2 alone didn't bring in all the required hadoop dependencies. That is why I added hadoop-common, which brought all the required deps.

    0 讨论(0)
  • 2021-01-04 07:57

    Hadoop HADOOP_CLASSPATH issues

    This would be helpful.

    Thanks & Regards,
    Alok Thaker

    0 讨论(0)
提交回复
热议问题