On 8/27/2013 4:29 PM, Tom Burton-West wrote:
According to the README.txt in solr-4.4.0/solr/example/solr/collection1,
all we have to do is create a collection1/lib directory and put whatever
jars we want in there.
".. /lib.
If it exists, Solr will load any Jars
found in this directory and use them to resolve any "plugins"
specified in your solrconfig.xml or schema.xml "
I did so (see below). However, I keep getting a class not found error
(see below).
Has the default changed from what is documented in the README.txt file?
Is there something I have to change in solrconfig.xml or solr.xml to make
this work?
I looked at SOLR-4852, but don't understand. It sounds like maybe there
is a problem if the collection1/lib directory is also specified in
solrconfig.xml. But I didn't do that. (i.e. out of the box solrconfig.xml)
Does this mean that by following what it says in the README.txt, I am
making some kind of a configuration error. I also don't understand the
workaround in SOLR-4852.
That's my bug! :) If you have sharedLib set to "lib" (or explicitly the
lib directory under solr.solr.home) in solr.xml, then ICUTokenizer
cannot be found despite the fact that all the correct jars are there.
The workaround is to remove sharedLib from solr.xml, or set it to some
other directory that either doesn't exist or has no jars in it. The
${solr.solr.home}/lib directory is automatically added to the classpath
regardless of config, there seems to be some kind of classloading bug
when the sharedLib adds the same directory again. This all worked fine
in 3.x, and early 4.x releases, but due to classloader changes, it seems
to have broken. I think (based on the issue description) that it
started being a problem with 4.3-SNAPSHOT.
The same thing happens if you set sharedLib to "foo" and put some of
your jars in lib and some in foo. It's quite mystifying.
Thanks,
Shawn