GitHub user eric-maynard opened a pull request: https://github.com/apache/spark/pull/21168
added check to ensure main method is found [SPARK-23830] ## What changes were proposed in this pull request? When a user specifies the wrong class -- or, in fact, a class instead of an object -- Spark throws an NPE which is not useful for debugging. This was reported in [SPARK-23830](https://issues.apache.org/jira/browse/SPARK-23830). This PR adds a check to ensure the main method was found and logs a useful error in the even that it's null. ## How was this patch tested? * Unit tests + Manual testing * The scope of the changes is very limited You can merge this pull request into a Git repository by running: $ git pull https://github.com/eric-maynard/spark feature/SPARK-23830 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/21168.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #21168 ---- commit 8c68dd7ff0d17e2a5d23583dac22487b292aa00b Author: eric-maynard <emaynard@...> Date: 2018-04-26T14:58:21Z added check to ensure main method is found [SPARK-23830] ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org