Erick , * * * Thanks.* It was actually a copy mistake. Anyways i did a redo of all the below mentioned steps. I had given class name as <filter class="pointcross.orchSynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
I did it again now following few different steps following this link : http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-32.htm 1 ) Created new package in src folder . *org.apache.pointcross.synonym*.This is having class Synonym.java 2) Now did a right click on same package and selected export option->Java tab->JAR File->Selected the path for package -> finish 3) This created jar file in specified location. Now followed in cmd , jar tfv org.apache.pointcross.synonym. the following was desc in cmd. :\Apps\Rajani Eclipse\Solr141_jar>jar - tfv org.apache.pointcross.synonym.Synonym.jar 25 Mon Apr 25 11:32:12 GMT+05:30 2011 META-INF/MANIFEST.MF 383 Thu Apr 14 16:36:00 GMT+05:30 2011 .project 2261 Fri Apr 22 16:26:12 GMT+05:30 2011 .classpath 1017 Thu Apr 21 16:34:20 GMT+05:30 2011 jarLog.jardesc 4) Now placed same jar file in solr home/lib folder .Solrconfig.xml enabled <lib dir="./lib" /> and in schema <filter class="synonym.Synonym" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> 5) Restart tomcat : http://localhost:8097/finding1 Error SEVERE: org.apache.solr.common.SolrException: Error loading class 'pointcross.synonym.Synonym' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:373) at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:388) at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84) at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141) at org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:835) at org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58) I am basically trying to enable this jar functionality to solr. Please let me know the mistake here. Rajani On Fri, Apr 22, 2011 at 6:29 PM, Erick Erickson <erickerick...@gmail.com>wrote: > First I appreciate your writeup of the problem, it's very helpful when > people > take the time to put in the details.... > > I can't reconcile these two things: > > {{{<filter class="org.apache.pco.search.orchSynonymFilterFactory" > synonyms="synonyms.txt" ignoreCase="true" expand="true"/> > > as org.apache.solr.common.SolrException: Error loading class > 'pointcross.orchSynonymFilterFactory' at}}} > > This seems to indicate that your config file is really looking for > "pointcross.orchSynonymFilterFactory" rather than > "org.apache....pco.search.orchSynonymFilterFactory". > > Do you perhaps have another definition in your config > "pointcross.orchSynonymFilterFactory"? > > Try running "jar -tfv <your jar file>" to see what classes > are actually defined in the file in the solr lib directory. Perhaps > it's not what you expect (Perhaps Eclipse did something > unexpected). > > Given the anomaly above (the error reported doesn't correspond to > the class you defined) I'd also look to see if you have any old > jars lying around that you somehow get to first. > > Finally, is there any chance that your > "pointcross.orchSynonymFilterFactory" > is a dependency of "org.apache....pco.search.orchSynonymFilterFactory"? In > which case Solr may be finding > "org.apache....pco.search.orchSynonymFilterFactory" > but failing to load a dependency (that would have to be put in the lib > or the jar). > > Hope that helps > Erick > > > > On Fri, Apr 22, 2011 at 3:00 AM, rajini maski <rajinima...@gmail.com> > wrote: > > One doubt regarding adding the solr plugin. > > > > > > I have a new java file created that includes few changes in > > SynonymFilterFactory.java. I want this java file to be added to solr > > instance. > > > > I created a package as : org.apache.pco.search > > This includes OrcSynonymFilterFactory java class extends > > BaseTokenFilterFactory implements ResourceLoaderAware {code.....} > > > > Packages included: import org.apache.solr.analysis.*; > > > > import org.apache.lucene.analysis.Token; > > import org.apache.lucene.analysis.TokenStream; > > import org.apache.solr.common.ResourceLoader; > > import org.apache.solr.common.util.StrUtils; > > import org.apache.solr.util.plugin.ResourceLoaderAware; > > > > import java.io.File; > > import java.io.IOException; > > import java.io.Reader; > > import java.io.StringReader; > > import java.util.ArrayList; > > import java.util.List; > > > > > > I exported this java file in eclipse, > > selecting File tab-Export to package > > -org.apache.pco.search-OrchSynonymFilterFactory.java > > and generated jar file - org.apache.pco.orchSynonymFilterFactory.jar > > > > This jar file placed in /lib folder of solr home instance > > Changes in solr config - <lib dir="./lib" /> > > > > Now i want to add this in schema fieldtype for synonym filter as > > > > <filter class="org.apache.pco.search.orchSynonymFilterFactory" > > synonyms="synonyms.txt" ignoreCase="true" expand="true"/> > > > > But i am not able to do it.." It has an error > > as org.apache.solr.common.SolrException: Error loading class > > 'pointcross.orchSynonymFilterFactory' at > > > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:373) > > at > > > org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:388) > > at org.apache.solr.util.plugin.AbstractPluginLoader" > > > > Please can anyone tell me , What is the mistake i am doing here and the > fix > > for it ? > > > > Rajani > > >