Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Workaround
-
None
Description
When running Solr in java9, and using the morphlines contrib(s) users may encounter vague errors such as...
No command builder registered for COMMAND_NAME
This error comes directly from the morphlines code, and relates to the use of wildcards in the importCommands declaration of of morphlines *.conf files used – for example...
importCommands : ["org.kitesdk.**", "org.apache.solr.**"]
Using wildcards like * and ** in morphline's importCommands config options do not work in java9 due to changes in the underlying JVM classloader.
This issue is tracked up stream in: https://github.com/kite-sdk/kite/issues/469
WORK AROUND
The workaround is to only use fully qualified command class names in importCommands declaration, one for each distinct command used in that conf file.
Example:
# Old config, does not work in java9 # importCommands : ["org.kitesdk.**", "org.apache.solr.**"] # replaced with... # using globs (foo.bar.* or foo.bar.**) will not work in Java9 due to classpath scanning limitations # so we enumarate every command (builder) we know this config uses below. (see SOLR-8876) importCommands : ["org.kitesdk.morphline.stdlib.LogDebugBuilder", "org.apache.solr.morphlines.solr.SanitizeUnknownSolrFieldsBuilder", "org.apache.solr.morphlines.solr.LoadSolrBuilder"]
Attachments
Attachments
Issue Links
- is related to
-
SOLR-8874 Add fixes and workaround for Java 9 Jigsaw (Module System) to Solr tests
- Closed