I wrote simple program in spark to write a dataframe to table in mySql.
The program is as follows:
import org.apache.spark.SparkConf import org.apache.sp
Eliasah was right. M2Eclipse does create a jar file but it's not a fat/uber jar. If I explicitly install the "maven assembly" plugin on the eclipse, I am able to create a fat jar with the dependency jars included and hence the program runs.