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 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//lib I
would have the solr-dataimporthandler-.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 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 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.
>
> class="org.apache.solr.handler.dataimport.DataImportHandler" >
>
>/localapps/dev/EventLog/data-config.xml
>
>
>
> 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.(SolrCore.java:820)
>at org.apache.solr.core.SolrCore.(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.(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 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:
>
>
> url="jdbc:postgresql://dx1f/OHRFC" user="awips" />
>
>deltaQuery="SELECT posttime FROM eventlogtext WHERE
> lastmodtime > '${dataimporter.last_index_time}'">
>
>
>
>
>
>
> 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
>
>
>