shangeyao opened a new issue, #4374:
URL: https://github.com/apache/streampark/issues/4374

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/streampark/issues?q=is%3Aissue+label%3A%22bug%22)
 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
   
   ```log
   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?
   
   - [x] Yes I am willing to submit a PR!(您是否要贡献这个PR?)
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to