Member since
08-17-2017
3
Posts
0
Kudos Received
0
Solutions
08-20-2017
07:51 AM
hey,did you solved the issue ..i am getting the same error ..please help me with this hadoop jar newtable-0.0.1-SNAPSHOT.jar newtable.createtable Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration at newtable.createtable.main(createtable.java:17) 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:234) at org.apache.hadoop.util.RunJar.main(RunJar.java:148) Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
... View more
08-18-2017
05:20 AM
Hello, can you please clarify the steps to run the jar..i have set the path as :- HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HBASE_HOME/lib/* and then running the jar
... View more
08-17-2017
01:44 PM
i am running my java code to create a table public static void main(String[] args) throws IOException { Configuration conf = HBaseConfiguration.create(); conf.set("hbase.zookeeper.quorum", "sandbox.hortonworks.com"); conf.set("hbase.zookeeper.property.clientPort", "2181"); conf.set("zookeeper.znode.parent", "/hbase-unsecure"); HBaseAdmin admin = new HBaseAdmin(conf); HTableDescriptor tableDescriptor = new HTableDescriptor(TableName.valueOf("people")); tableDescriptor.addFamily(new HColumnDescriptor("personal")); tableDescriptor.addFamily(new HColumnDescriptor("contactinfo")); admin.createTable(tableDescriptor); Put put = new Put(Bytes.toBytes("doe-john-m-12345")); } i build jar of code from maven eclipse and when running the jar in hadoop as:- hadoop@localhost]$ hadoop jar htable-0.0.1-SNAPSHOT.jar pack.createtable i am getting:-- java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration at pack.createtable.main(createtable.java:17) 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:234) at org.apache.hadoop.util.RunJar.main(RunJar.java:148) Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more
... View more
Labels:
- Labels:
-
Apache Hadoop
-
Apache HBase