[ 
https://issues.apache.org/jira/browse/SPARK-27121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16804184#comment-16804184
 ] 

Imran Rashid commented on SPARK-27121:
--------------------------------------

I think this might just be an issue with the test setup.  When I try to just 
run the spark-shell using java 11, things seem to work fine (the same things 
that break in the tests).

There is a bunch of code in those tests which is trying to be smart w/ the 
classpath to run the repl in the same jvm:

https://github.com/apache/spark/blob/50cded590f8c16ba3263a5ecba6805fb06dd8a64/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala#L40-L56

> Resolve Scala compiler failure for Java 9+ in REPL
> --------------------------------------------------
>
>                 Key: SPARK-27121
>                 URL: https://issues.apache.org/jira/browse/SPARK-27121
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Spark Shell
>    Affects Versions: 3.0.0
>            Reporter: Sean Owen
>            Priority: Major
>
> Currently under Java 11:
> {code}
> SingletonReplSuite:
> [init] error: error while loading Object, Missing dependency 'object scala in 
> compiler mirror', required by /modules/java.base/java/lang/Object.class
> Failed to initialize compiler: object scala in compiler mirror not found.
> ** Note that as of 2.8 scala does not assume use of the java classpath.
> ** For the old behavior pass -usejavacp to scala, or if using a Settings
> ** object programmatically, settings.usejavacp.value = true.
> Failed to initialize compiler: object scala in compiler mirror not found.
> ** Note that as of 2.8 scala does not assume use of the java classpath.
> ** For the old behavior pass -usejavacp to scala, or if using a Settings
> ** object programmatically, settings.usejavacp.value = true.
> org.apache.spark.repl.SingletonReplSuite *** ABORTED ***
>   Exception encountered when invoking run on a nested suite - The code passed 
> to eventually never returned normally. Attempted 110 times over 50.062409015 
> seconds. Last failure message: cond.apply() was false current output: 
> Interpreter encountered errors during initialization!
>   . (SingletonReplSuite.scala:92)
> ReplSuite:
> - propagation of local properties
> [init] error: error while loading Object, Missing dependency 'object scala in 
> compiler mirror', required by /modules/java.base/java/lang/Object.class
> ...
> {code}
> This is a fairly well-known issue with Scala and Java 9, though workarounds 
> online don't seem to apply to the REPL. So far I do not think Scala promises 
> compiler compatibility with Java 9+, and indeed that's why we compile with 
> Java 8. However the REPL compiles on the fly.
> See for example https://github.com/sbt/sbt/issues/2958



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to