Hbase: HBaseConfiguration class not found

Hi,

I am trying to load data into hbase, i am getting below error. can you please help me to resolve this issue.

[sreea20004607@ip-172-31-20-58 ~]$ spark-submit --class “com.di.test.hbase” --master local[4] /home/sreea20004607/customer/scripts/filter-1.0-SNAPSHOT.jar
Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration
at com.di.test.hbase$.main(hbase.scala:18)
at com.di.test.hbase.main(hbase.scala)
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:497)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:685)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration

Thanks,
Sree

Above issue have resolved after adding class path, but i am getting different error now. any idea about this error.

18/06/19 14:21:55 INFO DAGScheduler: Job 0 finished: first at HbaseTest.scala:74, took 0.395762 s
Exception in thread “main” java.lang.NoSuchMethodError: scala.Predef$.ArrowAssoc(Ljava/lang/Object;)Ljava/lang/Object;
at com.di.test.HbaseTest$$anonfun$readfile$1.apply(HbaseTest.scala:77)
at com.di.test.HbaseTest$$anonfun$readfile$1.apply(HbaseTest.scala:71)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
at com.di.test.HbaseTest$.readfile(HbaseTest.scala:71)
at com.di.test.HbaseTest$.main(HbaseTest.scala:21)
at com.di.test.HbaseTest.main(HbaseTest.scala)
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:497)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:685)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
18/06/19 14:21:55 INFO SparkContext: Invoking stop() from shutdown hook

Thanks,
Sree