Ken Krugler
09/03/2021, 5:32 PMPluginClassLoader.java that I think you made:
< import java.lang.reflect.Method;
39,47d37
<     Method method = null;
<     try {
<       method = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);
< 
<     } catch (NoSuchMethodException e) {
<       //this should never happen
<       ExceptionUtils.rethrow(e);
<     }
<     method.setAccessible(true);
50c40,47
<         method.invoke(classLoader, url);
---
>         /**
>          * ClassLoader in java9+ does not extend URLClassLoader.
>          * If the class is not found in the parent classloader,
>          * it will be found in this classloader via findClass().
>          *
>          * @see <https://community.oracle.com/tech/developers/discussion/4011800/base-classloader-no-longer-from-urlclassloader>
>          */
>         addURL(url);
@User I think you wrote the original code here, right?Ken Krugler
09/03/2021, 5:34 PMElon
09/03/2021, 5:37 PMKen Krugler
09/03/2021, 5:46 PMKishore G
Ken Krugler
09/03/2021, 10:45 PMPluginClassLoader.java, and the Hadoop job now runs w/o errors. So it seems pretty clear this was the change that broke things for Hadoop/Spark jobs. So…we could add a Java version check (kind of gross), or is there some approach that’s compatible with both Java 8 and Java 9+?Kishore G
Xiang Fu
Xiang Fu
Ken Krugler
09/03/2021, 10:55 PMKen Krugler
09/04/2021, 12:10 AMPluginClassLoader.java actually works w/Hadoop, we’d need to set up to run with Java 9 on our Hadoop cluster, which isn’t likely to happen any time soon.