Exception in thread main java lang NoClassDefFoundError

0 votes

Please help me solve this error:

$ HADOOP_CLASSPATH="${HBASE_HOME}/bin/hbase classpath" hadoop jar /opt/cloudera/parcels/CDH/lib/hbase/hbase
-server-1.2.0-cdh5.11.1.jar importtsv -Dimporttsv.separator=, -Dimporttsv.bulk.output=output -Dimporttsv.columns=HBAE_ROW_KEY,info:id,info:f
name,info:lname,info:age,info:prof customers custs
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/filter/Filter
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.(ProgramDriver.java:59)
at org.apache.hadoop.util.ProgramDriver.addClass(ProgramDriver.java:103)
at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.filter.Filter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 14 more
Aug 9, 2019 in Big Data Hadoop by Reshma
2,474 views

1 answer to this question.

0 votes

As far I can make out from the command used by you as below:

HADOOP_CLASSPATH="${HBASE_HOME}/bin/hbase classpath" hadoop jar /opt/cloudera/parcels/CDH/lib/hbase/hbase
-server-1.2.0-cdh5.11.1.jar importtsv -Dimporttsv.separator=, -Dimporttsv.bulk.output=output -Dimporttsv.columns=HBAE_ROW_KEY,info:id,info:f
name,info:lname,info:age,info:prof customers custs

You are using double quotes (i.e., ") before $. It should not be double quotes, instead it should be backtick which is present just below the esc button in the keypad.

Also the table name that you are using, make sure it is unique. Since if this table already exists you will not be able to execute bulk load operation.

answered Aug 9, 2019 by Arpit

Related Questions In Big Data Hadoop

+1 vote
2 answers

Hadoop: Error: Exception in thread “main” java.lang.UnsupportedClassVersionError: a

The reason for this error is because ...READ MORE

answered Aug 6, 2019 in Big Data Hadoop by Venkita
• 240 points
1,896 views
0 votes
1 answer
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,072 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,571 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
109,060 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,639 views
0 votes
2 answers

Exception in thread "main" java.lang.UnsupportedClassVersionError

Hi, keep in mind do not forget to ...READ MORE

answered Aug 5, 2019 in Big Data Hadoop by Rashi
1,474 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP