splash
splash copied to clipboard
java.lang.IllegalAccessError when running with Spark 2.4.0
Before build I've changed spark version in pom.xml: Spark-submit done in local[*] mode
<spark.version>2.4.0</spark.version>
java.lang.IllegalAccessError: tried to access class org.apache.spark.shuffle.sort.ShuffleInMemorySorter from class org.apache.spark.shuffle.sort.SplashUnsafeSorter
at org.apache.spark.shuffle.sort.SplashUnsafeSorter.
This error looks strange. These classes live in the same package. I check the code of spark 2.4.0, ShuffleInMemorySorter
is a class with package-level visibility. We should be able to access this class.
I have also tried the tests with following command:
mvn package -Dspark.version=2.4.0
And it finishes successfully. Would you please try the same command and see if you have any issues accessing this class?
Exception in thread "main" java.lang.IllegalAccessError: class org.apache.spark.storage.StorageUtils$ (in unnamed module @0x2a265ea9) cannot access class sun.nio.ch.DirectBuffer (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x2a265ea9
at org.apache.spark.storage.StorageUtils$.
Above error is coming while running spark application
@gmcaps - I am facing a similar issue as well, were you able to resolve this?
@gmcaps I was able to solve the issue you mentioned by adding JAVA_HOME to path env variables.