0

I am trying install dataimport handler in solr 3.3 for connecting mysql db to send data to solr for indexing. However I am getting the following error.

HTTP Status 500 - Severe errors in solr configuration. Check your log files for more detailed information on what may be wrong. If you want solr to continue after configuration errors, change: false in solr.xml ------------------------------------------------------------- org.apache.solr.common.SolrException: Error loading class 'org.apache.solr.handler.dataimport.DataImportHandler' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:389) at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:423) at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:459) at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:157) at org.apache.solr.core.SolrCore.(SolrCore.java:563) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:463) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:207) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:130) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254) and so on..

I have placed following in solrconfig.xml

<requestHandler name="/dataimport"class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">store-name-data-config.xml</str>
</lst> 
</requestHandler>

sample of store-name-data-config.xml is

- <dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"    url="jdbc:mysql://localhost/dbname" user="myusername" password="mypassword" /> 
- <document name="db name">
<entity name="store name" query="select name, address, city, state, zip, phone, web_address, area, area_group from store" /> 
</document>
</dataConfig>

I have placed the necessary files from contrib/dataimporthandler/libs directory to WEB-INF directory, although I think this where the problem might be, but not sure.

Any help would be greatly appreciated. Thanks.

1 Answer 1

1

Make sure the dataimport jars are located in the directories configured in solrconfig.xml with the <lib> directives.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.