Home Forums HBase Hbase shell exception:Exception in thread "main" java.lang.NoClassDefFoundError:

This topic contains 5 replies, has 5 voices, and was last updated by  tedr 1 year, 5 months ago.

  • Creator
    Topic
  • #14825

    shi xinpo
    Participant

    Exception in thread “main” java.lang.NoClassDefFoundError: is
    Caused by: java.lang.ClassNotFoundException: is
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: is. Program will exit.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #20142

    tedr
    Member

    Hi Bajeesh,

    Thanks for letting us know that it is working for you now.

    Thanks again,
    Ted.

    Collapse
    #20008

    Bajeesh TB
    Member

    Hi Robert,

    Its working fine now, that was package name issue. I have only basics of JAVA, so the issue was happened.

    Thanks for your help.

    Thanks,
    Bajeesh T.B

    Collapse
    #19969

    Robert
    Participant

    Hi Bajeesh,
    I believe your question would be best answered in this forum:

    http://hortonworks.com/community/forums/forum/core-hadoop/

    I understand the error looks familiar regarding the class not found exception, but your error is regarding to a mapreduce job. A couple of things you should add so the rest of the community can get a better understanding:

    Did you use manual rpm or Ambari installation?
    Are you able to run the default wordcount program like this:
    NOTE: you will need to make sure your input folder has a file to process
    hadoop jar /usr/lib/hadoop/hadoop-examples.jar wordcount wordcount/input output

    If the above works fine, then issue might be specific to your wordcount program.

    Regards,
    Robert

    Collapse
    #19883

    Bajeesh TB
    Member

    Hello,

    I have same issue when running
    hadoop jar wordcount.jar g.myorg.WordCount /input /output
    Exception in thread “main” java.lang.ClassNotFoundException: g.myorg.WordCount
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
    ————————————————————————————————
    #]javac -classpath /usr/lib/hadoop/hadoop-core-1.1.2.21.jar -d wordcount_classes WordCount.java

    Its working fine and it doesn’t showing any errors. I am using HDP 1.2.1.

    Please help me?

    Collapse
    #14891

    Larry Liu
    Moderator

    Hi, Shi Xinpo

    What version of HDP are you using? Can you please provide more detail about the issue you had?

    Thanks

    Larry

    Collapse
Viewing 5 replies - 1 through 5 (of 5 total)