Are you using a single instance or cloud? What version of Solr are you using? In your solrconfig.xml is the path to where you copied your library specified in a <lib> tag? Do you have a jar file for the Postgres JDBC driver in your lib directory as well?
For simple setup in 5.x I copy the jars to a lib directory under the core/collection directory. For example, under server/solr/<core-name>/lib I would have the solr-dataimporthandler-<version>.jar and the jdbc driver jar file. These should be automatically picked up without having to add anything to the solrconfig.xml in terms of <lib> tags. For a production cloud deployment, I create a lib directory outside of the core/collection directory somewhere else on the file system so that it is easy to install without having to wait for a directory to be created by the Collections CREATE command and add the appropriate entry to the solrconfig.xml. Then stick both jars in that directory. Your error may be different, but as long as I have both jars in one of the two places mentioned above with the appropriate entry in solrconfig.xml if needed, then it has been working in my setups. - Kevin > On Sep 4, 2015, at 9:40 AM, Mark Fenbers <mark.fenb...@noaa.gov> wrote: > > Greetings, > > I'm moving on from the tutorials and trying to setup an index for my own data > (from a database). All I did was add the following to the solrconfig.xml > (taken verbatim from the example in Solr documentation, except for the > name="config" pathname) and I get an error in the web-based UI. > > <requestHandler name="/dataimport" > class="org.apache.solr.handler.dataimport.DataImportHandler" > > <lst name="defaults"> > <str name="config">/localapps/dev/EventLog/data-config.xml</str> > </lst> > </requestHandler> > > Because of this error, no /dataimport page is available in the Admin user > interface; therefore, I cannot visit the page > http://localhost:8983/solr/dataimport. The actual error is: > > org.apache.solr.common.SolrException: Error Instantiating requestHandler, > org.apache.solr.handler.dataimport.DataImportHandler failed to instantiate > org.apache.solr.request.SolrRequestHandler > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820) > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:659) > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727) > at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447) > at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > Caused by: org.apache.solr.common.SolrException: Error Instantiating > requestHandler, org.apache.solr.handler.dataimport.DataImportHandler failed > to instantiate org.apache.solr.request.SolrRequestHandler > at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:588) > at org.apache.solr.core.PluginBag.createPlugin(PluginBag.java:122) > at org.apache.solr.core.PluginBag.init(PluginBag.java:217) > at > org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:130) > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:773) > ... 9 more > Caused by: java.lang.ClassCastException: class > org.apache.solr.handler.dataimport.DataImportHandler > at java.lang.Class.asSubclass(Class.java:3208) > at > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:475) > at > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:422) > at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:567) > ... 13 more > > > If I remove the <requestHandler> section and restart Solr, the error goes > away. As best I can tell, the contents of > /localapps/dev/EventLog/data-config.xml look fine, too. See it here: > > <dataConfig> > <dataSource driver="org.postgresql.Driver" > url="jdbc:postgresql://dx1f/OHRFC" user="awips" /> > <document> > <entity name="eventlogtext" query="SELECT * FROM eventlogtext" > deltaQuery="SELECT posttime FROM eventlogtext WHERE > lastmodtime > '${dataimporter.last_index_time}'"> > <entity name="categorytypes" query="SELECT catname FROM > categorytypes WHERE catid='${eventlogtext.category}'"> > </entity> > </entity> > </document> > </dataConfig> > > It seems to me that this problem could be a classpath issue, but I copied the > appropriate jar file into the solr/lib directory to be sure. This made the > (slightly different) initial error go away, but now I cannot make this one go > away. > > Any ideas? > > Mark > > >