title: Spark Submit fails with java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less;
body: <p>I am using spark 1.3.1 prebuild version spark-1.3.1-bin-hadoop2.6.tgz</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.NoSuchMethodError:
    scala.Predef$.$conforms()Lscala/Predef$$less$colon$less;  at
    org.apache.spark.util.Utils$.getSystemProperties(Utils.scala:1418)    at
    org.apache.spark.SparkConf.(SparkConf.scala:58)     at
    org.apache.spark.SparkConf.(SparkConf.scala:52)     at
    com.zoho.zbi.Testing.test(Testing.java:43)    at
    com.zoho.zbi.Testing.main(Testing.java:39) Using Spark's default log4j
    profile: org/apache/spark/log4j-defaults.properties</p>
  </blockquote>
  
  <p>I am trying a simple demo app to save to cassandra</p>
  
  <pre><code>SparkConf batchConf= new SparkConf()
              .setSparkHome(sparkHome)
              .setJars(jars)
              .setAppName(ZohoBIConstants.getAppName("cassandra"))//NO I18N
              .setMaster(master).set("spark.cassandra.connection.host", "localhost");
  
              JavaSparkContext sc = new JavaSparkContext(batchConf);
              // here we are going to save some data to Cassandra...
              List&lt;Person&gt; people = Arrays.asList(
                      Person.newInstance(1, "John", new Date()),
                      Person.newInstance(2, "Anna", new Date()),
                      Person.newInstance(3, "Andrew", new Date())
              );
  //          Person test = Person.newInstance(1, "vini", new Date())''
              System.out.println("Inside Java API Demo : "+people);
              JavaRDD&lt;Person&gt; rdd = sc.parallelize(people);
              System.out.println("Inside Java API Demo rdd : "+rdd);
              javaFunctions(rdd).writerBuilder("test", "people", mapToRow(Person.class)).saveToCassandra();
              System.out.println("Stopping sc");
              sc.stop();
  </code></pre>
  
  <p>when i submit using spark submit its working</p>
  
  <pre><code>bin/spark-submit --class "abc.efg.Testing" --master spark://xyz:7077 /home/test/target/uber-Cassandra-0.0.1-SNAPSHOT.jar
  </code></pre>
  
  <p>Here is my pom</p>
  
  <p>dependencies</p>
  
  <pre><code>&lt;dependencies&gt;
    &lt;!-- Scala --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.scala-lang&lt;/groupId&gt;
          &lt;artifactId&gt;scala-library&lt;/artifactId&gt;
          &lt;version&gt;${scala.version}&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.scala-lang&lt;/groupId&gt;
          &lt;artifactId&gt;scala-compiler&lt;/artifactId&gt;
          &lt;version&gt;${scala.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- END Scala --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
      &lt;artifactId&gt;guava&lt;/artifactId&gt;
      &lt;version&gt;18.0&lt;/version&gt;
    &lt;/dependency&gt;
  
    &lt;dependency&gt;
      &lt;groupId&gt;com.yammer.metrics&lt;/groupId&gt;
      &lt;artifactId&gt;metrics-core&lt;/artifactId&gt;
      &lt;version&gt;2.2.0&lt;/version&gt;
    &lt;/dependency&gt;
  
    &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
  
    &lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
      &lt;version&gt;3.1.0&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
    &lt;/dependency&gt;
  
    &lt;dependency&gt;
      &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt;
      &lt;artifactId&gt;cassandra-driver-core&lt;/artifactId&gt;
      &lt;version&gt;2.1.5&lt;/version&gt;
    &lt;/dependency&gt;
  
    &lt;dependency&gt;
      &lt;groupId&gt;org.json&lt;/groupId&gt;
      &lt;artifactId&gt;json&lt;/artifactId&gt;
      &lt;version&gt;20090211&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;!-- Cassandra Spark Connector dependency --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.datastax.spark&lt;/groupId&gt;
      &lt;artifactId&gt;spark-cassandra-connector_2.10&lt;/artifactId&gt;
      &lt;version&gt;1.2.0&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;!-- Cassandra java Connector dependency --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.datastax.spark&lt;/groupId&gt;
      &lt;artifactId&gt;spark-cassandra-connector-java_2.10&lt;/artifactId&gt;
      &lt;version&gt;1.2.0&lt;/version&gt;
    &lt;/dependency&gt; 
  
  &lt;!-- Spark Core dependency --&gt;
          &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
                  &lt;artifactId&gt;spark-core_2.11&lt;/artifactId&gt;
                  &lt;version&gt;1.3.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;!-- Spark dependency --&gt;
          &lt;dependency&gt;
                   &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
                   &lt;artifactId&gt;spark-streaming_2.11&lt;/artifactId&gt;
                  &lt;version&gt;1.3.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;!-- Spark dependency --&gt;
          &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
                  &lt;artifactId&gt;spark-streaming-kafka_2.10&lt;/artifactId&gt;
                  &lt;version&gt;1.3.1&lt;/version&gt;
          &lt;/dependency&gt;
    &lt;/dependencies&gt;
  </code></pre>
  
  <p>and i build using</p>
  
  <pre><code>&lt;build&gt;
        &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.7&lt;/source&gt;
                  &lt;target&gt;1.7&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
             &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;filters&gt;
                          &lt;filter&gt;
                              &lt;artifact&gt;*:*&lt;/artifact&gt;
                              &lt;excludes&gt;
                                  &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                                  &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                                  &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
                              &lt;/excludes&gt;
                          &lt;/filter&gt;
                      &lt;/filters&gt;
                      &lt;finalName&gt;uber-${project.artifactId}-${project.version}&lt;/finalName&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
             &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.7&lt;/source&gt;
                  &lt;target&gt;1.7&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
        &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  
  <p>but when i submit through code its not working, any help is much appriciated.. I tried added scala2.10.4 prop in pom still no luck</p>
  
  <p>I am running in eclipse as run as application with all master,spark home and jars set to sparkConf the error shows exactly in sparkConf</p>
  
  <p>My scala version is </p>
  
  <p>scala -version
  Scala code runner version 2.11.2 -- Copyright 2002-2013, LAMP/EPFL</p>
  
  <p>is this has anything to do with the issue?</p>
  
  <p>How to swtich to an older version of scala? In the doc it says spark1.3.1 supports scala 2.10.x versions, please let me know how to fix this</p>