Re: Error Instantiating UpdateRequestProcessorFactory
I’ve found the issue. - First, my IDE was putting all the Solr JAR dependencies into my custom JAR. I noticed the JAR was 14MB when it should have been a few Kb. I changed this to get a JAR with only my classes in. - I then ran into CNFEs of the Solr UpdateRequestProcessorFactory and UpdateRequestProcessor classes. This was because I was adding my JAR to Tomcat’s lib folder where they are loaded before the solr web app’s libs, so it was not finding the dependencies. By moving my JAR into the solr web app WEB-INF/lib this issue is resolved. Cheers On 20 Sep 2014, at 05:30, Shalin Shekhar Mangar shalinman...@gmail.com wrote: Sounds like a class loader issue. Try adding your jar to $SOLR_HOME/lib instead of tomcat lib. Also, upgrade to Solr 4.x, 3.6 is ancient! :) On Sat, Sep 20, 2014 at 1:13 AM, Allistair C allist...@gmail.com wrote: Hi all, I’m in a bit of a cul de sac with an issue, hope you can help. I am creating a custom UpdateRequestProcessor. The Solr documentation details that I need to write a factory class subclassing UpdateRequestProcessorFactory and this should return an instance of my class that subclasses UpdateRequestProcessor. I have done this, and I have created a JAR. I have deployed the JAR into Tomcat’s lib folder where Solr is running. I have modified the solrconfig to include my class correctly. On startup Solr finds my class but does not believe it conforms to being a UpdateRequestProcessorFactory. SEVERE: org.apache.solr.common.SolrException: Error Instantiating UpdateRequestProcessorFactory, com.acme.solr.update.processor.URLRewriteUpdateRequestProcessorFactory is not a org.apache.solr.update.processor.UpdateRequestProcessorFactory at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:421) Things I have tried: - Ensured that I am compiling my JAR with the exact JDK that is running Solr. - Downloaded Solr 3.6.2 and copied one of the Solr built-in processors, renamed it, compiled it and tried to use it - SAME issue. - Created a test that uses the same code as the Solr code that is failing (namely, isAssignableFrom): Class clazz = Class.forName(com.acme.solr.update.processor.URLRewriteUpdateRequestProcessorFactory); boolean isA = UpdateRequestProcessorFactory.class.isAssignableFrom(clazz); System.out.println(isA); Print’s “true” - i.e. it’s perfectly OK! I include my simple processor here: package com.acme.solr.update.processor; public class URLRewriteUpdateRequestProcessorFactory extends UpdateRequestProcessorFactory { @Override public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) { return new URLRewriteProcessor(next); } } class URLRewriteProcessor extends UpdateRequestProcessor { public URLRewriteProcessor(UpdateRequestProcessor next) { super(next); } @Override public void processAdd(AddUpdateCommand cmd) throws IOException { SolrInputDocument doc = cmd.getSolrInputDocument(); doc.setField(foo, bar); super.processAdd(cmd); } } At this point I am at a loss and would appreciate any assistance or ideas to try. Cheers -- Regards, Shalin Shekhar Mangar.
Error Instantiating UpdateRequestProcessorFactory
Hi all, I’m in a bit of a cul de sac with an issue, hope you can help. I am creating a custom UpdateRequestProcessor. The Solr documentation details that I need to write a factory class subclassing UpdateRequestProcessorFactory and this should return an instance of my class that subclasses UpdateRequestProcessor. I have done this, and I have created a JAR. I have deployed the JAR into Tomcat’s lib folder where Solr is running. I have modified the solrconfig to include my class correctly. On startup Solr finds my class but does not believe it conforms to being a UpdateRequestProcessorFactory. SEVERE: org.apache.solr.common.SolrException: Error Instantiating UpdateRequestProcessorFactory, com.acme.solr.update.processor.URLRewriteUpdateRequestProcessorFactory is not a org.apache.solr.update.processor.UpdateRequestProcessorFactory at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:421) Things I have tried: - Ensured that I am compiling my JAR with the exact JDK that is running Solr. - Downloaded Solr 3.6.2 and copied one of the Solr built-in processors, renamed it, compiled it and tried to use it - SAME issue. - Created a test that uses the same code as the Solr code that is failing (namely, isAssignableFrom): Class clazz = Class.forName(com.acme.solr.update.processor.URLRewriteUpdateRequestProcessorFactory); boolean isA = UpdateRequestProcessorFactory.class.isAssignableFrom(clazz); System.out.println(isA); Print’s “true” - i.e. it’s perfectly OK! I include my simple processor here: package com.acme.solr.update.processor; public class URLRewriteUpdateRequestProcessorFactory extends UpdateRequestProcessorFactory { @Override public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) { return new URLRewriteProcessor(next); } } class URLRewriteProcessor extends UpdateRequestProcessor { public URLRewriteProcessor(UpdateRequestProcessor next) { super(next); } @Override public void processAdd(AddUpdateCommand cmd) throws IOException { SolrInputDocument doc = cmd.getSolrInputDocument(); doc.setField(foo, bar); super.processAdd(cmd); } } At this point I am at a loss and would appreciate any assistance or ideas to try. Cheers
Re: Error Instantiating UpdateRequestProcessorFactory
Sounds like a class loader issue. Try adding your jar to $SOLR_HOME/lib instead of tomcat lib. Also, upgrade to Solr 4.x, 3.6 is ancient! :) On Sat, Sep 20, 2014 at 1:13 AM, Allistair C allist...@gmail.com wrote: Hi all, I’m in a bit of a cul de sac with an issue, hope you can help. I am creating a custom UpdateRequestProcessor. The Solr documentation details that I need to write a factory class subclassing UpdateRequestProcessorFactory and this should return an instance of my class that subclasses UpdateRequestProcessor. I have done this, and I have created a JAR. I have deployed the JAR into Tomcat’s lib folder where Solr is running. I have modified the solrconfig to include my class correctly. On startup Solr finds my class but does not believe it conforms to being a UpdateRequestProcessorFactory. SEVERE: org.apache.solr.common.SolrException: Error Instantiating UpdateRequestProcessorFactory, com.acme.solr.update.processor.URLRewriteUpdateRequestProcessorFactory is not a org.apache.solr.update.processor.UpdateRequestProcessorFactory at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:421) Things I have tried: - Ensured that I am compiling my JAR with the exact JDK that is running Solr. - Downloaded Solr 3.6.2 and copied one of the Solr built-in processors, renamed it, compiled it and tried to use it - SAME issue. - Created a test that uses the same code as the Solr code that is failing (namely, isAssignableFrom): Class clazz = Class.forName(com.acme.solr.update.processor.URLRewriteUpdateRequestProcessorFactory); boolean isA = UpdateRequestProcessorFactory.class.isAssignableFrom(clazz); System.out.println(isA); Print’s “true” - i.e. it’s perfectly OK! I include my simple processor here: package com.acme.solr.update.processor; public class URLRewriteUpdateRequestProcessorFactory extends UpdateRequestProcessorFactory { @Override public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) { return new URLRewriteProcessor(next); } } class URLRewriteProcessor extends UpdateRequestProcessor { public URLRewriteProcessor(UpdateRequestProcessor next) { super(next); } @Override public void processAdd(AddUpdateCommand cmd) throws IOException { SolrInputDocument doc = cmd.getSolrInputDocument(); doc.setField(foo, bar); super.processAdd(cmd); } } At this point I am at a loss and would appreciate any assistance or ideas to try. Cheers -- Regards, Shalin Shekhar Mangar.
Error with UpdateRequestProcessorFactory
Hi folks, I'm having some problem with a custom handler on my Solr. All the application works fine, but when I do a new checkout from svn and generate a jar file with my handler, I got: SEVERE: java.lang.NoSuchMethodError: org.apache.solr.core.SolrCore.getUpdateProcessorFactory(Ljava/lang/String;)Lorg/apache/solr/update/processor/UpdateRequestProcessorFactory; I checked versions of my libs and they're ok. I'm using Solr 1.3 and the environment is the same that works previously. Does anyone have an idea of what could be? Thanks! Cheers, -- Daniel Cassiano _ http://www.apontador.com.br/ http://www.maplink.com.br/
Re: Error with UpdateRequestProcessorFactory
On Tue, Aug 4, 2009 at 7:28 PM, Daniel Cassiano danielcassi...@gmail.comwrote: Hi folks, I'm having some problem with a custom handler on my Solr. All the application works fine, but when I do a new checkout from svn and generate a jar file with my handler, I got: SEVERE: java.lang.NoSuchMethodError: org.apache.solr.core.SolrCore.getUpdateProcessorFactory(Ljava/lang/String;)Lorg/apache/solr/update/processor/UpdateRequestProcessorFactory; I checked versions of my libs and they're ok. I'm using Solr 1.3 and the environment is the same that works previously. Are you using the released Solr 1.3 or some intermediate nightly build? The 1.3 release has SolrCore.getUpdateProcessorChain(String) method. -- Regards, Shalin Shekhar Mangar.
Re: Error with UpdateRequestProcessorFactory
Hi Shalin, On Tue, Aug 4, 2009 at 12:43 PM, Shalin Shekhar Mangarshalinman...@gmail.com wrote: I'm having some problem with a custom handler on my Solr. All the application works fine, but when I do a new checkout from svn and generate a jar file with my handler, I got: SEVERE: java.lang.NoSuchMethodError: org.apache.solr.core.SolrCore.getUpdateProcessorFactory(Ljava/lang/String;)Lorg/apache/solr/update/processor/UpdateRequestProcessorFactory; I checked versions of my libs and they're ok. I'm using Solr 1.3 and the environment is the same that works previously. Are you using the released Solr 1.3 or some intermediate nightly build? The 1.3 release has SolrCore.getUpdateProcessorChain(String) method. You are ritght. I was using some nightly build. I changed to the released 1.3 and it works. Thanks! -- Daniel Cassiano _ Page: http://danielcassiano.net/ http://www.umitproject.org/