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

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


bq. I think it's because CoreContainer.create() is catching Exceptions, not 
Errors, when updating the coreInitFailure map. 

Sure - but the piece i couldn't make sense of is why/where 
testJavaLangErrorFromHandlerOnStartup passed (and those Errors ere in 
coreInitFailures) but testJavaLangErrorFromSchemaOnStartup didn't.

digging arround a bit more, it looks like this is because SolrCore() is 
wrapping _some_ types of Throwable in SolrException (shudder) but the 
IndexSchema already exists before the SolreCore constructor is called, and any 
Errors that come from it don't get similar wrapping.

bq. Maybe the best solution is for SolrResourceLoader to try and catch 
LinkageErrors and rethrow it as a SolrException. Catching classloader problems 
is I think within the resource loader's remit (unlike out of memory errors, 
etc).

maybe - but that's a slippery slope i'd rather avoid -- i'm catching & 
re-throwing Errors is one thing, *wrapping* Errors in Exceptions is something 
i'm very much not a fan of.

i think a safer (and more all encompasing) fix would be for CoreContainer to 
handle wraping Errors in SolrException - not for the purpose of re-throwing, 
but just for tracking in coreInitFailures.  that way even for things like OOM 
or IOError during core init, we still have a note about it in coreInitFailures.

---

Attaching an updated patch that goes this direction - still running tests, but 
review/comments appreciated

> Core load silently aborted if missing schema has depenencies - LinkageErrors 
> swollowed
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-6643
>                 URL: https://issues.apache.org/jira/browse/SOLR-6643
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 4.10.1
>            Reporter: Jan Høydahl
>            Priority: Minor
>              Labels: logging
>         Attachments: SOLR-6643.patch, SOLR-6643.patch
>
>
> *How to reproduce*
> # Start with standard collection1 config
> # Add a field type to schema using the ICU contrib, no need for a field
> {code:XML}
> <fieldType name="text_icu" class="solr.TextField">
>   <analyzer><tokenizer class="solr.ICUTokenizerFactory"/></analyzer>
> </fieldType>
> {code}
> # {{cd example}}
> # {{mkdir solr/lib}}
> # {{cp ../contrib/analysis-extras/lucene-libs/lucene-analyzers-icu-4.10.1.jar 
> solr/lib/}}
> # {{bin/solr -f}}
> # Core is not loaded, and no messages in log after this line
> {code}
> ... INFO  org.apache.solr.schema.IndexSchema  – [collection1] Schema 
> name=example
> {code}
> Note that we did *not* add the dependency libs from {{analysis-extras/lib}}, 
> so we'd expect a {{ClassNotFoundException}}, but some way the initialization 
> of schema aborts silently. The ICUTokenizerFactory is instansiated by 
> reflection and I suspect that some exception is swallowed in 
> {{AbstractPluginLoader#create()}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to