lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: [jira] [Commented] (SOLR-4652) Resource loader has broken behavior for solr.xml plugins (basically ShardHandlerFactory)
Date Mon, 01 Apr 2013 16:57:19 GMT

I've been having to re-train myself to only highlight and auto-format
the code I'm changing rather than the whole file just to avoid having
a bunch of cosmetic-only changes which SOME PEOPLE complain about <G>.
Actually, I complain about it when I have to wade through a patch, so
I can't whimper too much.

Personally I'd like to reformat the entire source tree and allow
absolutely free whole-file reformats but I'm unwilling to do the work


On Mon, Apr 1, 2013 at 12:41 PM, Ryan Ernst (JIRA) <> wrote:
>     [
> Ryan Ernst commented on SOLR-4652:
> ----------------------------------
> {quote}
> For future patches, please dont reorder import statements, but thats not problematic
> {quote}
> Sorry about that.  I have intellij set to reorder imports automatically.  I'll figure
out how to turn this off for my lucene-solr project.
>> Resource loader has broken behavior for solr.xml plugins (basically ShardHandlerFactory)
>> ----------------------------------------------------------------------------------------
>>                 Key: SOLR-4652
>>                 URL:
>>             Project: Solr
>>          Issue Type: Bug
>>    Affects Versions: 4.2
>>            Reporter: Ryan Ernst
>>            Assignee: Uwe Schindler
>>             Fix For: 4.3, 5.0
>>         Attachments: SOLR-4652.patch, SOLR-4652.patch
>> I have the following scenario:
>> MyShardHandlerFactory is plugged in via solr.xml.  The jar containing MyShardHandlerFactory
is in the shared lib dir.  There are a couple issues:
>> 1. From within a per core handler (that is loaded within the core's lib dir), you
grab the ShardHandlerFactory from CoreContainer, casting to MyShardHandlerFactory will results
in a ClassCastException with a message like "cannot cast instance of MyShardHandlerFactory
to MyShardHandlerFactory".
>> 2. Adding a custom dir for shared lib (for example "mylib") does not work.  The ShardHandlerFactory
is initialized before sharedLib is loaded.
>> I've been pouring through the code on this and I don't see an easy fix.  I'll keep
looking at it, but I wanted to get this up so hopefully others have some thoughts on how best
to fix.  IMO, it seems like there needs to be a clear chain of resource loaders (one for loading
solr.xml, a child for loading the lib dir, used for solr.xml plugins, a grandchild for per
core config, and a great grandchild for per core lib dir based plugins).  Right now there
are some siblings, because any place a SolrResourceLoader is created with a null parent classloader,
it gets the jetty thread's classloader as the parent.
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators
> For more information on JIRA, see:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message