[ https://issues.apache.org/jira/browse/SPARK-26839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun updated SPARK-26839: ---------------------------------- Description: Java 9+ changed how ClassLoaders work. The two most salient points: The boot classloader no longer 'sees' the platform classes. A new 'platform classloader' does and should be the parent of new ClassLoaders The system classloader is no longer a URLClassLoader, so we can't get the URLs of JARs in its classpath was: 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/java.net.URLClassLoader.findClass(URLClassLoader.java:471) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588) 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(ClassLoader.java:521) {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 "java.net" currently.) > Work around classloader changes in Java 9 for Hive isolation > ------------------------------------------------------------ > > Key: SPARK-26839 > URL: https://issues.apache.org/jira/browse/SPARK-26839 > Project: Spark > Issue Type: Sub-task > Components: SQL > Affects Versions: 3.0.0 > Reporter: Imran Rashid > Assignee: Sean Owen > Priority: Major > Fix For: 3.0.0 > > > Java 9+ changed how ClassLoaders work. The two most salient points: > The boot classloader no longer 'sees' the platform classes. A new 'platform > classloader' does and should be the parent of new ClassLoaders > The system classloader is no longer a URLClassLoader, so we can't get the > URLs of JARs in its classpath -- 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