I have an Spark app which runs with no problem in local mode,but have some problems when submitting to the Spark cluster.
The error msg are as follows:
Where is the sparkContext object defined, is it inside the main function?
I too faced the same problem, the mistake which i did was i initiated the sparkContext outside the main function and inside the class.
When I initiated it inside the main function, it worked fine.