spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Imran Rashid (JIRA)" <>
Subject [jira] [Commented] (SPARK-26839) on JDK11, IsolatedClientLoader must be able to load java.sql classes
Date Wed, 06 Feb 2019 22:55:00 GMT


Imran Rashid commented on SPARK-26839:

I found that just on a regular scala 2.12 shell in jdk 1.8, {{ClassLoader.getSystemClassLoader.getParent.getParent}}
also returns null, so it doesn't seem to just be jdk11.

> scala
Welcome to Scala 2.12.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_65).
Type in expressions for evaluation. Or try :help.

scala> ClassLoader.getSystemClassLoader.getParent.getParent
res0: ClassLoader = null

> on JDK11, IsolatedClientLoader must be able to load java.sql classes
> --------------------------------------------------------------------
>                 Key: SPARK-26839
>                 URL:
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Imran Rashid
>            Priority: Major
> This might be very specific to my fork & a kind of weird system setup I'm working
on, I haven't completely confirmed yet, but I wanted to report it anyway in case anybody else
sees this.
> When I try to do anything which touches the metastore on java11, I immediately get errors
from IsolatedClientLoader that it can't load anything in java.sql.  eg.
> {noformat}
> scala> spark.sql("show tables").show()
> java.lang.ClassNotFoundException: java.lang.NoClassDefFoundError: java/sql/SQLTransientException
when creating Hive client using classpath: file:/home/systest/jdk-11.0.2/, ...
> ...
> Caused by: java.lang.ClassNotFoundException: java.sql.SQLTransientException
>   at java.base/
>   at java.base/java.lang.ClassLoader.loadClass(
>   at org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1.doLoadClass(IsolatedClientLoader.scala:230)
>   at org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1.loadClass(IsolatedClientLoader.scala:219)
>   at java.base/java.lang.ClassLoader.loadClass(
> {noformat}
> After a bit of debugging, I also discovered that the {{rootClassLoader}} is {{null}}
in {{IsolatedClientLoader}}.  I think this would work if either {{rootClassLoader}} could
load those classes, or if {{isShared()}} was changed to allow any class starting with "java."
 (I'm not sure why it only allows "java.lang" and "" currently.)

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message