title: Problems while compiling a spark project in eclipse
body: <p>i've configured everything accordingly to the <a href="http://spark.apache.org/documentation.html" rel="nofollow">spark website</a>, to launch a simple spark app <strong><em>which reads and counts lines in a file and shows the numbers in another file</em></strong>.But i'm not able to run the application because <strong><em>i'm getting a lot of errors</em></strong> and i don't understand what's is wrong.</p>
  
  <p><strong><em>this is my project structure:</em></strong></p>
  
  <pre><code>sparkExamples
  |-- pom.xml
  `-- src
      |-- main/java/org/sparkExamplex/App.java
  `-- resources
            |-- readLine
            |-- outputReadLine
  </code></pre>
  
  <p><strong><em>pom.xml</em></strong></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;org.sparkexamples&lt;/groupId&gt;
      &lt;artifactId&gt;sparkExamples&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;name&gt;sparkExamples&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  
      &lt;dependencies&gt;
          &lt;dependency&gt; &lt;!-- Spark dependency --&gt;
              &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
              &lt;artifactId&gt;spark-core_2.10&lt;/artifactId&gt;
              &lt;version&gt;1.3.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong><em>App.java</em></strong></p>
  
  <pre><code>import org.apache.spark.SparkConf;
  import org.apache.spark.api.java.JavaRDD;
  import org.apache.spark.api.java.JavaSparkContext;
  import org.apache.spark.api.java.JavaPairRDD;
  import org.apache.spark.api.java.function.FlatMapFunction;
  import org.apache.spark.api.java.function.Function2;
  import org.apache.spark.api.java.function.PairFunction;
  
  import scala.Tuple2;
  
  import java.util.Arrays;
  import java.util.regex.Pattern;
  
  public final class App {
      private static final Pattern SPACE = Pattern.compile(" ");
  
      public static void main(String[] args) throws Exception {
  
          String inputFile = "resources/readLine";
          String outputFile = "resources/outputReadLine";
          // Create a Java Spark Context.
          SparkConf conf = new SparkConf().setAppName("wordCount").setMaster("spark://127.0.0.1:7077");
          JavaSparkContext sc = new JavaSparkContext(conf);
          // Load our input data.
          JavaRDD&lt;String&gt; input = sc.textFile(inputFile);
          // Split up into words.
          JavaRDD&lt;String&gt; words = input.flatMap(new FlatMapFunction&lt;String, String&gt;() {
              public Iterable&lt;String&gt; call(String x) {
                  return Arrays.asList(x.split(" "));
              }
          });
          // Transform into word and count.
          JavaPairRDD&lt;String, Integer&gt; counts = words.mapToPair(new PairFunction&lt;String, String, Integer&gt;() {
              public Tuple2&lt;String, Integer&gt; call(String x) {
                  return new Tuple2(x, 1);
              }
          }).reduceByKey(new Function2&lt;Integer, Integer, Integer&gt;() {
              public Integer call(Integer x, Integer y) {
                  return x + y;
              }
          });
          // Save the word count back out to a text file, causing evaluation.
          counts.saveAsTextFile(outputFile);
      }
  }
  
  
      }
  </code></pre>
  
  <p>errors shown:</p>
  
  <pre><code>Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
  15/06/03 13:11:46 INFO SparkContext: Running Spark version 1.3.1
  15/06/03 13:11:47 INFO SecurityManager: Changing view acls to: Administrator
  15/06/03 13:11:47 INFO SecurityManager: Changing modify acls to: Administrator
  15/06/03 13:11:47 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(Administrator); users with modify permissions: Set(Administrator)
  15/06/03 13:11:47 INFO Slf4jLogger: Slf4jLogger started
  15/06/03 13:11:47 INFO Remoting: Starting remoting
  15/06/03 13:11:47 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriver@mvettos.romelab.it.ibm.com:9164]
  15/06/03 13:11:47 INFO Utils: Successfully started service 'sparkDriver' on port 9164.
  15/06/03 13:11:47 INFO SparkEnv: Registering MapOutputTracker
  15/06/03 13:11:47 INFO SparkEnv: Registering BlockManagerMaster
  15/06/03 13:11:47 INFO DiskBlockManager: Created local directory at C:\Users\ADMINI~1\AppData\Local\Temp\spark-e6bb5cfc-6b96-4105-9a1c-843832ba60f9\blockmgr-dea7bb85-954c-4a4d-b3fb-74d7b6b1d9f5
  15/06/03 13:11:47 INFO MemoryStore: MemoryStore started with capacity 467.6 MB
  15/06/03 13:11:47 INFO HttpFileServer: HTTP File server directory is C:\Users\ADMINI~1\AppData\Local\Temp\spark-6e11c6bc-2743-4172-8d74-f3abc08d9f46\httpd-2bfa61a2-a1fd-4bd3-85c2-bcbc05d2ec27
  15/06/03 13:11:47 INFO HttpServer: Starting HTTP Server
  15/06/03 13:11:48 INFO Server: jetty-8.y.z-SNAPSHOT
  15/06/03 13:11:48 INFO AbstractConnector: Started SocketConnector@0.0.0.0:9165
  15/06/03 13:11:48 INFO Utils: Successfully started service 'HTTP file server' on port 9165.
  15/06/03 13:11:48 INFO SparkEnv: Registering OutputCommitCoordinator
  15/06/03 13:11:48 INFO Server: jetty-8.y.z-SNAPSHOT
  15/06/03 13:11:48 INFO AbstractConnector: Started SelectChannelConnector@0.0.0.0:4040
  15/06/03 13:11:48 INFO Utils: Successfully started service 'SparkUI' on port 4040.
  15/06/03 13:11:48 INFO SparkUI: Started SparkUI at http://mvettos.romelab.it.ibm.com:4040
  15/06/03 13:11:48 INFO AppClient$ClientActor: Connecting to master akka.tcp://sparkMaster@127.0.0.1:7077/user/Master...
  15/06/03 13:11:49 WARN AppClient$ClientActor: Could not connect to akka.tcp://sparkMaster@127.0.0.1:7077: akka.remote.InvalidAssociation: Invalid address: akka.tcp://sparkMaster@127.0.0.1:7077
  15/06/03 13:11:49 WARN Remoting: Tried to associate with unreachable remote 
  address [akka.tcp://sparkMaster@127.0.0.1:7077]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: Connection refused: no further information: /127.0.0.1:7077
  15/06/03 13:12:08 INFO AppClient$ClientActor: Connecting to master akka.tcp://sparkMaster@127.0.0.1:7077/user/Master...
  15/06/03 13:12:09 WARN AppClient$ClientActor: Could not connect to akka.tcp://sparkMaster@127.0.0.1:7077: akka.remote.InvalidAssociation: Invalid address: akka.tcp://sparkMaster@127.0.0.1:7077
  15/06/03 13:12:09 WARN Remoting: Tried to associate with unreachable remote address [akka.tcp://sparkMaster@127.0.0.1:7077]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: Connection refused: no further information: /127.0.0.1:7077
  15/06/03 13:12:28 INFO AppClient$ClientActor: Connecting to master akka.tcp://sparkMaster@127.0.0.1:7077/user/Master...
  15/06/03 13:12:29 WARN AppClient$ClientActor: Could not connect to akka.tcp://sparkMaster@127.0.0.1:7077: akka.remote.InvalidAssociation: Invalid address: akka.tcp://sparkMaster@127.0.0.1:7077
  15/06/03 13:12:29 WARN Remoting: Tried to associate with unreachable remote address [akka.tcp://sparkMaster@127.0.0.1:7077]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: Connection refused: no further information: /127.0.0.1:7077
  15/06/03 13:12:48 ERROR SparkDeploySchedulerBackend: Application has been killed. Reason: All masters are unresponsive! Giving up.
  15/06/03 13:12:48 WARN SparkDeploySchedulerBackend: Application ID is not initialized yet.
  15/06/03 13:12:48 ERROR TaskSchedulerImpl: Exiting due to error from cluster scheduler: All masters are unresponsive! Giving up.
  </code></pre>
  
  <p>Someone can let me how to figure how on this?</p>
  
  <p>thanks in advance.</p>