RE: Where to put my plugins?
This is about Solr 1.1.0 running on Win XP w/JDK 1.5. Thank you. -Original Message- From: Teruhiko Kurosaka [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 06, 2007 5:32 PM To: solr-user@lucene.apache.org Subject: Where to put my plugins? 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(NativeMethodAccess orImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessor 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?
Re: Where to put my plugins?
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
RE: Where to put my plugins?
Ryan, Thank you. But creating lib under example/solr and placing my plugin jar there yielded the same error of not able to locate org/apache/solr/analysis/BaseTokenizerFactory How can this be -kuro
RE: Where to put my plugins?
Never mind. My mistake. I still had a copy of the jar in ext dir. After cleaning it up, it's now loading my plugin. THANK YOU VERY MUCH! -Original Message- From: Teruhiko Kurosaka [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 06, 2007 5:58 PM To: solr-user@lucene.apache.org Subject: RE: Where to put my plugins? Ryan, Thank you. But creating lib under example/solr and placing my plugin jar there yielded the same error of not able to locate org/apache/solr/analysis/BaseTokenizerFactory How can this be -kuro