the "importCommands" parsing code for dealing with prefix based globs (ie: org.kitesdk.** or com.foo.morphlines.*) Doesn't work using Java9.
This seems to be because the underlying classpath scanning is build on the ClassPath.from(ClassLoader) API shadded from Guava, which has a very notable limitation documented...
* <p>Currently only {@link URLClassLoader} and only {@code file://} urls are supported.
...but in Java9, URLClassLoader is (aparently) rarely used as a result of the new (jigsaw) module system.
The only work around seems to be to change all morphlines configs to remove * globs from importCommands declarations and enumate every CommandBuilder implemenation needed for the config.
I suggest morphlines switch to using SPI based scanning for CommandBuilders since that is a good API for plugins that has been supported by the JVM for a looooong time, and continues to work in Java9.
the
"importCommands"
parsing code for dealing with prefix based globs (ie:org.kitesdk.**
orcom.foo.morphlines.*
) Doesn't work using Java9.This seems to be because the underlying classpath scanning is build on the
ClassPath.from(ClassLoader)
API shadded from Guava, which has a very notable limitation documented......but in Java9,
URLClassLoader
is (aparently) rarely used as a result of the new (jigsaw) module system.The only work around seems to be to change all morphlines configs to remove
*
globs fromimportCommands
declarations and enumate everyCommandBuilder
implemenation needed for the config.I suggest morphlines switch to using SPI based scanning for CommandBuilders since that is a good API for plugins that has been supported by the JVM for a looooong time, and continues to work in Java9.
See also: https://issues.apache.org/jira/browse/SOLR-8876