i try to get use to "sbt" in order to build stnd allone application by myself
the example "SimpleApp" i managed to run than i tried to copy some example scala program like "LinearRegression" in a local directory . ./build.sbt ./src ./src/main ./src/main/scala ./src/main/scala/LinearRegression.scala my build.sbt even when I dont know what I do looks like name := "Linear Regression" version := "1.0" scalaVersion := "2.10.4" libraryDependencies += "org.apache.spark" %% "spark-core" % "1.0.2" libraryDependencies += "org.apache.spark" %% "spark-mllib" % "1.0.2" libraryDependencies += "com.github.scopt" %% "scopt" % "3.2.0" resolvers += "Akka Repository" at "http://repo.akka.io/releases/" By the way... first i tried scalaVersion := 2.11.2 which is my installed version. but this faild ... sbt package builds a jar file in target but the command spark-submit --class "LinearRegression" --master local[2] target/scala-2.10/linear-regression_2.10-1.0.jar ~/git/spark/data/mllib/sample_linear_regression_data.txt didnt work. it tells me Spark assembly has been built with Hive, including Datanucleus jars on classpath Exception in thread "main" java.lang.NoClassDefFoundError: scopt/OptionParser at java.lang.Class.getDeclaredMethods0(Native Method) AHHH: I comented /*package org.apache.spark.examples.mllib*/ in LinearRegression.scala because otherwise it doesnt find the main class Exception in thread "main" java.lang.ClassNotFoundException: LinearRegression when I does the same with the pre build jar package of examples everything works fine spark-submit --class org.apache.spark.examples.mllib.LinearRegression --master local[2] lib/spark-examples-1.0.2-hadoop2.2.0.jar ~/git/spark/data/mllib/sample_linear_regression_data.txt works !!! spark-submit --class org.apache.spark.examples.mllib.LinearRegression --master local[2] lib/spark-examples-1.0.2-hadoop2.2.0.jar ~/git/spark/data/mllib/sample_linear_regression_data.txt -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/org-apache-spark-examples-xxx-tp13052p13178.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org