title: Illegal Access error in GraphX
body: <p>I'm using Spark and Graphx on IntelliJ IDEA for the first time. I'm trying to create a graph and running queries on it but I'm getting the following error: </p>
  
  <p>java.lang.IllegalAccessError: tried to access class org.apache.spark.util.collection.Sorter from class org.apache.spark.graphx.impl.EdgePartitionBuilder</p>
  
  <p>Here's my code:</p>
  
  <pre><code>package org.apache.spark.examples
  // import required spark classes
  
  
  import org.apache.spark._
  import org.apache.spark.SparkContext._
  import org.apache.spark.SparkConf
  import org.apache.spark.graphx._
  import org.apache.spark.rdd.RDD
  // define main method (scala entry point)
  object HelloWorld {
    def main(args: Array[String]) {
  
      val conf = new SparkConf().setAppName("HelloWorld")
      val sc = new SparkContext(conf)
      val vertexArray = Array(
        (1L, ("Alice", 28)),
        (2L, ("Bob", 27)),
        (3L, ("Charlie", 65)),
        (4L, ("David", 42)),
        (5L, ("Ed", 55)),
        (6L, ("Fran", 50))
      )
      val edgeArray = Array(
        Edge(2L, 1L, 7),
        Edge(2L, 4L, 2),
        Edge(3L, 2L, 4),
        Edge(3L, 6L, 3),
        Edge(4L, 1L, 1),
        Edge(5L, 2L, 2),
        Edge(5L, 3L, 8),
        Edge(5L, 6L, 3)
      )
      val vertexRDD: RDD[(Long, (String, Int))] = sc.parallelize(vertexArray)
      val edgeRDD: RDD[Edge[Int]] = sc.parallelize(edgeArray)
      val graph: Graph[(String, Int), Int] = Graph(vertexRDD, edgeRDD)
  
      // Solution 1
      graph.vertices.filter { case (id, (name, age)) =&gt; age &gt; 30 }.collect.foreach {
        case (id, (name, age)) =&gt; println(s"$name is $age")
      }
  
      // Solution 2
      graph.vertices.filter(v =&gt; v._2._2 &gt; 30).collect.foreach(v =&gt; println(s"${v._2._1} is ${v._2._2}"))
  
      // Solution 3
      for ((id,(name,age)) &lt;- graph.vertices.filter { case (id,(name,age)) =&gt; age &gt; 30 }.collect) {
        println(s"$name is $age")
      }
  
      sc.stop()
  
    }
  }
  </code></pre>