Skip to content

[Bug] Failed to register Spark 4.x environment due to JDK version mismatch #4374

Description

@shangeyao

Search before asking

  • I had searched in the issues and found no similar issues.

Java Version

StreamPark Console running on JDK 8 (class file version 52.0)

Scala Version

2.12.x

StreamPark Version

dev branch (latest)

Spark Version

4.1.2

Deploy mode

N/A (Spark environment registration)

What happened

When adding a Spark 4.1.2 environment in StreamPark Console, registration fails during version detection. StreamPark invokes spark-submit --version using the Console service JDK (Java 8), but Spark 4.x requires Java 17+.

Error Exception

java.lang.IllegalStateException: [StreamPark] parse spark version failed. Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/spark/launcher/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
  at org.apache.streampark.common.conf.SparkVersion.(SparkVersion.scala:64)
  at org.apache.streampark.console.core.entity.SparkEnv.getSparkVersion(SparkEnv.java:93)
  at org.apache.streampark.console.core.service.impl.SparkEnvServiceImpl.create(SparkEnvServiceImpl.java:77)

Expected behavior

Users should be able to register Spark 4.x environments without upgrading the StreamPark Console service JDK. Version detection should not depend on running spark-submit with an incompatible Java version.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!(您是否要贡献这个PR?)

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions