Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jvm-packages] support jdk 17 for test #9959

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Conversation

wbo4958
Copy link
Contributor

@wbo4958 wbo4958 commented Jan 8, 2024

When I tried to run tests with the command "mvn clean package" under jvm-packages using jdk-17, I ran into the below error,

*** RUN ABORTED ***
An exception or error caused a run to abort: class org.apache.spark.storage.StorageUtils$ (in unnamed module @0x5a6d67c3) cannot access class sun.nio.ch.DirectBuffer (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x5a6d67c3 
  java.lang.IllegalAccessError: class org.apache.spark.storage.StorageUtils$ (in unnamed module @0x5a6d67c3) cannot access class sun.nio.ch.DirectBuffer (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x5a6d67c3
  at org.apache.spark.storage.StorageUtils$.<init>(StorageUtils.scala:213)
  at org.apache.spark.storage.StorageUtils$.<clinit>(StorageUtils.scala)
  at org.apache.spark.storage.BlockManagerMasterEndpoint.<init>(BlockManagerMasterEndpoint.scala:114)
  at org.apache.spark.SparkEnv$.$anonfun$create$9(SparkEnv.scala:358)
  at org.apache.spark.SparkEnv$.registerOrLookupEndpoint$1(SparkEnv.scala:295)
  at org.apache.spark.SparkEnv$.create(SparkEnv.scala:344)
  at org.apache.spark.SparkEnv$.createDriverEnv(SparkEnv.scala:196)
  at org.apache.spark.SparkContext.createSparkEnv(SparkContext.scala:279)
  at org.apache.spark.SparkContext.<init>(SparkContext.scala:464)
  at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2740)

So I created this PR to fix this issue. And I also tested it using jdk 8 and jdk 17, both Java versions can work.

@trivialfis trivialfis merged commit 3ff3a5f into dmlc:master Jan 8, 2024
28 checks passed
@wbo4958 wbo4958 deleted the jdk-17 branch March 14, 2024 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants