You need to create also a class that
extends org.apache.solr.update.processor.UpdateRequestProcessorFactory. This
is the one that you indicate on the solrconfig and it's the one that will
instantiate your UpdateRequestProcessor.
see
http://lucene.apache.org/solr/api/org/apache/solr/update/processor/UpdateRequestProcessorFactory.html

Regards,
Tomás

On Wed, Aug 31, 2011 at 1:22 PM, samuele.mattiuzzo <samum...@gmail.com>wrote:

> SEVERE: org.apache.solr.common.SolrException: Error Instantiating
> UpdateRequestProcessorFactory, ToTheGoCustom is not a
> org.apache.solr.update.processor.UpdateRequestProcessorFactory
>
> i'm getting this error, but i don't know how to fix it
>
> this is solrconfig.xml:
>
>  <updateRequestProcessorChain name="ToTheGoCustom">
>      <processor class="ToTheGoCustom" />
>       <processor class="solr.LogUpdateProcessorFactory" />
>       <processor class="solr.RunUpdateProcessorFactory" />
>  </updateRequestProcessorChain>
>
> ...
>
>  <requestHandler name="/update" class="solr.XmlUpdateRequestHandler">
>
>       <lst name="defaults">
>         <str name="update.processor">ToTheGoCustom</str>
>       </lst>
>
>  </requestHandler>
>
> and this is my class implementation
>
> import java.io.IOException;
>
> import org.apache.solr.common.SolrInputDocument;
> /* Solr import */
> import org.apache.solr.request.SolrQueryRequest;
> //import org.apache.solr.request.SolrQueryResponse;
> import org.apache.solr.update.AddUpdateCommand;
> import org.apache.solr.update.processor.UpdateRequestProcessor;
> import org.apache.solr.update.processor.UpdateRequestProcessorFactory;
>
>
> class ToTheGoCustom extends UpdateRequestProcessor
> {
>
>
>
>        public ToTheGoCustom( UpdateRequestProcessor next) {
>                super( next );
>
>        }
>
>        //routine di modifica
>        @Override
>        public void processAdd(AddUpdateCommand cmd) throws IOException {
>                SolrInputDocument doc = cmd.getSolrInputDocument();
>
>                //salary dal documento
>                Object sal = doc.getFieldValue( "salary" );
>                setSalary(doc,sal);
>
>                //location dal documento
>                Object loc = doc.getFieldValue( "location" );
>                Object cc = doc.getFieldValue( "countrycode" );
>                setLocation(doc,loc,cc);
>
>                //jobfield, jobposition dal document
>                Object title = doc.getFieldValue( "job_title" );
>                Object description = doc.getFieldValue( "description" );
>                //setFieldPosition(doc,title,description);
>
>
>                // ritorna il documento modificato all'handler principale
>                super.processAdd(cmd);
>        }
>        /* stuff here, not dangerous */
> }
>
> the file is called ToTheGoCustom.java, inside a NetBeans project called
> ToTheGoCustom, and built as jar ToTheGoCustom.jar
> i put it inside the solr-installation lib folder. I already did that once,
> and it worked smoothly, i just added some methods and it gave me that
> error.
>
> The only thing that may have changed is my editor, since i went throu a
> formatting and reinstalled everything... So i think i built the plugins in
> different ways (one working and one not, but i cannot recall the working
> one...)
>
> what am i missing? please be explicit, i'm really giving it up, this is too
> messy to even only understand :(
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-custom-plugins-is-it-possible-to-have-them-persistent-tp3292781p3298850.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to