Your problem is probably a classpath issue, but that's like saying
"something's not right", there can be many reasons the classloader
can't find your class.

Look in your jar files to insure that you have what you think is in there,
you can
use 'jar -tf jarfile.jar' to see a list of classes in the file. You may not
have packaged
your classes correctly (i.e. is there "package" directive, something like:
package org.apache.solr.analysis; in your source)?

You shouldn't have to regenerate the analysis jar. Simply create a small
project
that has your files in it, compile that into a jar and drop the jar into
"the right
place" in your Solr hierarchy (see solrconfig.xml, the <lib> directives)
and
you should be fine.

If none of that helps, can you tell us what you've tried?

Best
Erick


On Wed, Dec 29, 2010 at 8:12 AM, nitishgarg <[email protected]>wrote:

>
> I have written a custom analyzer for Marathi Language on the lines of
> French
> Analyzer present in Lucene tweaking the stemming part. For compilation I
> put
> the three classes MarathiAnalyzer, MarathiStemFilter and MarathiStemmer in
> the MarathiAnalyzer class only (otherwise I was receiving errors that the
> marathiStemmer class is unavailable in MarathiStemFilter, dunno why?).
>
> After compilation I regenerated the lucene-analyzers-2.9.1.jar file and put
> it in the lib folder.
> But when I edit my schema.xml to use MarathiAnlyzer by writing <analyzer
> type="index" class="org.apache.lucene.analysis.mr.MarathiAnalyzer">, and
> when I run the start.jar file Solr throws me classNotFoundException as:
> java.lang.ClassNotFoundException:
> org.apache.lucene.analysis.mr.MarathiAnalyzer
>
> I tried using the FrenchAnalyzer using the same method and I was successful
> in doing that, but unsuccessful when I do the same for MarathiAnalyzer.
>
> Can anybody tell where I am mistaking?
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Custom-Analyzer-tp2162710p2162710.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to