0
votes

I have configured my solr on centos box and configured my solrconfig.xml to use 'dataimporthandler' plugin.

My solrconfig contains the following configuration:

<lib dir="/path/to/solr/dist" regex="apache-solr-dataimporthandler-.*\.jar" />
...
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
   <lst name="defaults">
      <str name="config">data-config.xml</str>
   </lst>
</requestHandler>

and the 'data-config.xml' contains the correct db connections.

However when I access the that plugin: http://localhost:8080/solr_app/dataimport (with or without a command), I get the following errors:

Dec 30, 2011 6:46:03 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.AbstractMethodError: org.apache.solr.handler.RequestHandlerBase.handleRequestBody(Lorg/apache/solr/request/SolrQueryRequest;Lorg/apache/solr/response/SolrQueryResponse;)V
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
    at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:636)

The really annoying part is these errors give no clear indication what is wrong. Mind you I was able to set this up on my local desktop with no issues. Running this on an online 'Centos 5.7' box ... errors!

Thanks in advance.

1
Could you check if your solr version and dataimport jar match with each other? - javanna
apache-solr-solrj-1.4.1.jar and apache-solr-dataimporthandler-1.4.1 ... I simply downloaded the solr lib and all the jars come together so I assume they would not package different versions in one. - lemonSkip
@javanna you are right. This being my first encounter with solr the solution here is to make sure you do not mix 1.4.1 with 3.5.0. - lemonSkip
Great, I added my comment as answer. - javanna

1 Answers

2
votes

Looks like your solr version running is different from the solr dataimporthandler jar version. Could you check this?
In fact, the solr version of the war running must be the same of the dataimporthandler library you put on the classpath.