0

I would like to use Solr 4.4.0 with MS SQL 2008/2012. I found some tutorials but they are either for an older version of Solr or they refer to data import handler files that don't exist in my Solr installation.

For example, this one refers to apache-solr-dataimporthandler files, but I can't find them in my installation. Where should I get them from? Or has the mechanism changed in Solr 4.4.0?

update

the data import handler returns the following error:

ERROR - 2013-08-15 15:17:43.414; org.apache.solr.core.CoreContainer; Unable to create core: collection1 org.apache.solr.common.SolrException: RequestHandler init failure at org.apache.solr.core.SolrCore.(SolrCore.java:835) at org.apache.solr.core.SolrCore.(SolrCore.java:629) at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:622) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:657) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.solr.common.SolrException: RequestHandler init failure at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:167) at org.apache.solr.core.SolrCore.(SolrCore.java:772) ... 13 more Caused by: org.apache.solr.common.SolrException: Error Instantiating Request Handler, org.apache.solr.handler.dataimport.DataImportHandler failed to instantiate org.apache.solr.request.SolrRequestHandler at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:551) at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:603) at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:153) ... 14 more Caused by: java.lang.ClassCastException: class org.apache.solr.handler.dataimport.DataImportHandler at java.lang.Class.asSubclass(Unknown Source) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:433) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:381) at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:530) ... 16 more ERROR - 2013-08-15 15:17:43.416; org.apache.solr.common.SolrException; null:org.apache.solr.common.SolrException: Unable to create core: collection1 at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1150) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:666) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.solr.common.SolrException: RequestHandler init failure at org.apache.solr.core.SolrCore.(SolrCore.java:835) at org.apache.solr.core.SolrCore.(SolrCore.java:629) at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:622) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:657) ... 10 more Caused by: org.apache.solr.common.SolrException: RequestHandler init failure at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:167) at org.apache.solr.core.SolrCore.(SolrCore.java:772) ... 13 more Caused by: org.apache.solr.common.SolrException: Error Instantiating Request Handler, org.apache.solr.handler.dataimport.DataImportHandler failed to instantiate org.apache.solr.request.SolrRequestHandler at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:551) at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:603) at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:153) ... 14 more Caused by: java.lang.ClassCastException: class org.apache.solr.handler.dataimport.DataImportHandler at java.lang.Class.asSubclass(Unknown Source) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:433) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:381) at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:530) ... 16 more

AFAIK I have only one place where the jar files are included, which is the tomcat lib directory. I will look for Solr alternatives that don't use Java since I have already spent almost a week getting this thing working.

jao
  • 18,273
  • 15
  • 63
  • 96

1 Answers1

2

The data import handler is used in Solr 4.4 but it is managed in a different way. You set it up using the solrconfig.xml file and create a new xml file with the driver settings. You can follow this blog entry to set it up - it is set-up to work with a postgresql database and jdbc driver but you can tweak the settings to work with MS SQL 2008

http://amac4.blogspot.co.uk/2013/08/configuring-solr-4-data-import-handler.html

Allan Macmillan
  • 1,481
  • 3
  • 18
  • 30
  • Thanks. I realized that working with Java means there are a lot of configuration files and settings to make sure they are set correctly. Solr is running at the moment, but the data import handler is returning lots of errors, even though I did everything exactly according the blog above – jao Aug 15 '13 at 13:24
  • Check the log files, whats causing it to fail? – Allan Macmillan Aug 15 '13 at 13:27
  • So this thread seems to have the same problem, check it out, could be to do with your jar files http://stackoverflow.com/questions/14827375/solr-4-1-dataimporthandler-classnotfoundexception – Allan Macmillan Aug 15 '13 at 13:46
  • Thanks. I installed Solr using the Bitnami installer and then followed the instructions in the blog post. Now it doesn't crash anymore – jao Aug 15 '13 at 14:00
  • What was it that you changed? – Allan Macmillan Aug 15 '13 at 14:12
  • Using Bitname Solr installer instead of tomcat – jao Aug 15 '13 at 14:15