If the example is in:
C:\workspace\solr\example
Try putting you custom .jar in:
C:\workspace\solr\example\solr\lib
Check the README in solr home:
C:\workspace\solr\example\solr\README.txt
This directory is optional. 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 (ie: Analyzers,
Request Handlers, etc...)
Teruhiko Kurosaka wrote:
I made a plugin that has a Tokenizer, its Factory, a
Filter and its Factory. I modified example/solr/conf/schema.xml
to use these Factories.
Following
http://wiki.apache.org/solr/SolrPlugins
I placed the plugin jar in the top level lib and ran
the start.jar. I got:
org.mortbay.util.MultiException[org.apache.solr.core.SolrException:
Error loading class 'com.basistech.rlp.solr.RLPTokenizerFactory']
Clearly, Jetty cannot locate my plugin.
I put the jar in example/lib and got the same error.
After taking look at jetty document:
http://docs.codehaus.org/display/JETTY/Classloading
but not fully understanding it, I put the plugin jar
in example/ext. Then I got:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.mortbay.start.Main.invokeMain(Main.java:151)
at org.mortbay.start.Main.start(Main.java:476)
at org.mortbay.start.Main.main(Main.java:94)
Caused by: java.lang.NoClassDefFoundError:
org/apache/solr/analysis/BaseTokenizerFactory
Better, Jetty can find my plugin, but it cannot load
one of the the Solr classes for it?
I also tried "the old way" described in the first doc,
expanding the war file,
but the result was same as above. (Can't find
org/apache/solr/analysis/BaseTokenizerFactory)
Where am I supposed to put my Tokenizer/Filter plugin?
-kuro