[ 
https://issues.apache.org/jira/browse/SOLR-8876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man updated SOLR-8876:
---------------------------
    Attachment: SOLR-8876.patch


Root issue appears to be a (non-test) bug in how morphlines parses it's config 
file.

Syntax like this...

{noformat}
    importCommands : ["org.kitesdk.**", "org.apache.solr.**"]
{noformat}

...is intended to trigger classpath scanning of those package (prefixes) 
looking for classes that implement morphline's  {{CommandBuilder}} interface, 
which can then be refered to by name later in the config.

This classpath scanning doesn't work in java9 (likely due to the way the 
ClassLoader specifics have changed)

It appears that this limitation can be worked arround by having a config which 
explicitly identifies all of the \*Builder classes needed for the config, e.g. 
...

{noformat}
    # 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"]
{noformat}

I opened an upstream issue: https://github.com/kite-sdk/kite/issues/469

----

The attached patch removes these problematic globs from all the test configs in 
solr, and removes all "SOLR-8876" + {{Constants.JRE_IS_MINIMUM_JAVA9}} related 
"assumes".  With this patch, running morphline-core, morphline-cell, & 
map-reduce tests under java9 seem to pass/skip reliably (and failures found 
when using {{\-Dtests.awaitsfix=true}} seem to match the existing test failures 
using  {{\-Dtests.awaitsfix=true}} with java8)

I suggest we commit & backport this patch, but leave this jira open with a 
modified summary/description drawing attention to the morphlines config 
limitation in java9 and the workaround.




> Morphlines tests fail with Java 9 (Jigsaw)
> ------------------------------------------
>
>                 Key: SOLR-8876
>                 URL: https://issues.apache.org/jira/browse/SOLR-8876
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - MapReduce
>            Reporter: Uwe Schindler
>              Labels: Java9
>         Attachments: SOLR-8876.patch
>
>
> They fail with: "No command builder registered for name".
> I added an assume through SOLR-8874.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to