[ 
https://issues.apache.org/jira/browse/SPARK-14711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15246333#comment-15246333
 ] 

Mark Grover commented on SPARK-14711:
-------------------------------------

Posting here, mostly for search indexing:-)

The error without this change is:
{code}
bin/run-example SparkPi
java.lang.ClassNotFoundException: org.apache.spark.examples.SparkPi
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at org.apache.spark.util.Utils$.classForName(Utils.scala:177)
        at 
org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:683)
        at 
org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:183)
        at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:208)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:122)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
{code}

> Examples jar not a part of distribution
> ---------------------------------------
>
>                 Key: SPARK-14711
>                 URL: https://issues.apache.org/jira/browse/SPARK-14711
>             Project: Spark
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 2.0.0
>            Reporter: Mark Grover
>
> While mucking around with some examples, it seems like spark-examples jar is 
> not being included in the distribution tarball. Also, it's not in the 
> classpath in the spark-submit classpath, which means commands like 
> {{run-example}} fail to work, whether a "distribution" tarball is used or a 
> regular {{mvn package}} build.
> The root cause of this may be due to the fact that the spark-examples jar is 
> under {{$SPARK_HOME/examples/target}} while all its dependencies are at 
> {{$SPARK_HOME/examples/target/scala-2.11/jars}}. And, we only seem to be 
> including the jars directory in the classpath. See 
> [here|https://github.com/apache/spark/blob/master/launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java#L354]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to