title: Exception in thread "main" java.lang.IllegalAccessError: class org.apache.spark.storage.StorageUtils$
body: <p>Hi I try to run spark on my local laptop.
  I created a mvn project in intelijidea and in my main class I have one line like bellow and when I try to run a project I got the error like below</p>
  <pre><code> val spark = SparkSession.builder().master(&quot;local&quot;).getOrCreate()
  </code></pre>
  <p>21/11/02 18:02:35 INFO BlockManagerMasterEndpoint: BlockManagerMasterEndpoint up
  Exception in thread &quot;main&quot; java.lang.IllegalAccessError: class org.apache.spark.storage.StorageUtils$ (in unnamed module @0x34e9fd99) cannot access class sun.nio.ch.DirectBuffer (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x34e9fd99
  at org.apache.spark.storage.StorageUtils$.(StorageUtils.scala:213)
  at org.apache.spark.storage.BlockManagerMasterEndpoint.(BlockManagerMasterEndpoint.scala:110)
  at org.apache.spark.SparkEnv$.$anonfun$create$9(SparkEnv.scala:348)
  at org.apache.spark.SparkEnv$.registerOrLookupEndpoint$1(SparkEnv.scala:287)
  at org.apache.spark.SparkEnv$.create(SparkEnv.scala:336)
  at org.apache.spark.SparkEnv$.createDriverEnv(SparkEnv.scala:191)
  at org.apache.spark.SparkContext.createSparkEnv(SparkContext.scala:277)
  at org.apache.spark.SparkContext.(SparkContext.scala:460)
  at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2690)
  at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$2(SparkSession.scala:949)
  at scala.Option.getOrElse(Option.scala:201)
  at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:943)
  at Main$.main(Main.scala:8)
  at Main.main(Main.scala)</p>
  <p>My dependency in pom</p>
  <pre><code> &lt;dependencies&gt;
  &lt;!-- https://mvnrepository.com/artifact/org.apache.spark/spark-core --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
      &lt;artifactId&gt;spark-core_2.13&lt;/artifactId&gt;
      &lt;version&gt;3.2.0&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- https://mvnrepository.com/artifact/org.apache.spark/spark-sql --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
      &lt;artifactId&gt;spark-sql_2.13&lt;/artifactId&gt;
      &lt;version&gt;3.2.0&lt;/version&gt;
  
  &lt;/dependency&gt;
  &lt;!-- https://mvnrepository.com/artifact/org.apache.spark/spark-hive --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
      &lt;artifactId&gt;spark-hive_2.11&lt;/artifactId&gt;
      &lt;version&gt;2.1.3&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  
  &lt;/dependency&gt;
  </code></pre>
  <p>Any idea how to resolve this problem ?</p>