GitHub user baishuo opened a pull request: https://github.com/apache/spark/pull/2876
[SPARK-4034]change the scope of guava to compile After click maven->reimport for spark project in idea, and begin to start "sparksqlclidriver" in idea, we will get a exception: Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/util/concurrent/ThreadFactoryBuilder at org.apache.spark.util.Utils$.<init>(Utils.scala:611) at org.apache.spark.util.Utils$.<clinit>(Utils.scala) at org.apache.spark.SparkContext.<init>(SparkContext.scala:178) at org.apache.spark.sql.hive.thriftserver.SparkSQLEnv$.init(SparkSQLEnv.scala:36) at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.<init>(SparkSQLCLIDriver.scala:256) at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver$.main(SparkSQLCLIDriver.scala:149) at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.main(SparkSQLCLIDriver.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) This is casued by after maven->reimport was clicked, the scope of guava*.jar in the project spark-hive-thriftserver is changed to provided(rigth click project spark-hive-thriftserver->choose the tab Dependencies, will find each jar's scope in this project ). We can change it to "compile" ,and re-start SparkSQLCLIDriver, the excepiton disappear. But if we re-run maven->reimport, the scope of guava*.jar will return to "provided" You can merge this pull request into a Git repository by running: $ git pull https://github.com/baishuo/spark patch-4034-pom-provided Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/2876.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 #2876 ---- commit 17c41b4552dfef37ad6d89498546695e066268dd Author: baishuo <vc_j...@hotmail.com> Date: 2014-10-21T10:14:55Z change the scope of guava to compile ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org